Repository navigation
Handle symbol name conflicts during executable linking. - #5978
Merged
Merged
Conversation
ScottTodd
marked this pull request as ready for review
May 21, 2021 18:02
ScottTodd
commented
May 21, 2021
MaheshRavishankar
requested changes
May 21, 2021
MaheshRavishankar
left a comment
Collaborator
There was a problem hiding this comment.
Just some minor comments
| static void printRodataOp(OpAsmPrinter &p, RodataOp &op) { | ||
| p << op.getOperationName() << ' '; | ||
|
|
||
| // TODO(#4670): Share across ops or upstream a custom directive |
Collaborator
There was a problem hiding this comment.
I see we dont print all the attributes on this op. The canonical way of doing this is to print the attribute list on the op, there is a stock method to do that which excepts a list of already printed attribues. Anyway, just an FYI. Its not needed here.
Member
Author
There was a problem hiding this comment.
This custom printer/parser already skips some of the default formatting with its attributes. This special handling for symbol visibility as a bare word op prefix is forked from upstream:
MaheshRavishankar
approved these changes
May 21, 2021
ScottTodd
force-pushed
the
linking-symbol-conflicts
branch
from
May 21, 2021 21:59
16aed8f to
0f57486
Compare
benvanik
approved these changes
Jun 1, 2021
ScottTodd
force-pushed
the
linking-symbol-conflicts
branch
from
June 1, 2021 18:27
4daf6f7 to
34f7a1e
Compare
ScottTodd
enabled auto-merge
June 1, 2021 19:09
ScottTodd
added a commit
that referenced
this pull request
Jun 1, 2021
Reverts #5978 This broke some benchmark builds ([logs](https://buildkite.com/iree/iree-android-benchmark/builds/2658#c7c611a3-414b-402e-b621-4cebeb4294ac)) ``` mobilenet-v2/iree_input.mlir:783:12: error: redefinition of symbol named '__constant_32xf32_0' ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Executable linking merges multiple modules together into a single module. If a symbol name already exists in the merged module, we previously skipped over it assuming the contents of those symbols were identical. This now resolve conflicts by
Fixes #5946.
Includes a step towards #4670 that should be made generic in some way.
Issues like #4897 will still need to use MLIR symbol visibility (not some special visibility) or ensure uniqueness prior to this pass.