Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ThinLTO] Allow importing based on a workload definition #74545
[ThinLTO] Allow importing based on a workload definition #74545
Changes from 3 commits
7e256dc
37bc16a
f71bf9a
72cf3dc
d090aa1
569ed19
483e157
54cc882
71b5305
e428d7b
df23812
d017457
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change shouldImport to a name that is more descriptive of what it is checking, e.g. something like moduleAlreadyHasPreferredDef (with a flipped return value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, depending on how much you care about speed, you could completely skip the search for a candidate in the case where the module already contains either a prevailing or a non-interposable copy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this work for internal linkage functions? Are you relying on the user having specified -funique-internal-linkage-names? Ah, I see you cover this in the PR description, would be good to add a comment here and where you describe the format of the input file (which I suggest earlier at the option definition). Also, make sure the fallback handling makes sense in the cases where the option was not specified (e.g. should there be an error if the entry already exists in this map for the name?). Also, include an internal linkage function in test case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the comments. For test, @m1_f2 is
internal
and imported by the second module.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also reporting (LLVM_DEBUG) ambiguous names, if the workfload def references such things.