As discussed in D18298, some local globals can't
be renamed/promoted (because they have a section, or because
they are referenced from inline assembly).
To be able to detect naming collision, we need to keep around
the "GUID" using their original name without taking the linkage
into account.
Details
- Reviewers
tejohnson - Commits
- rGae64eafd3178: Store and emit original name in combined index
Diff Detail
Event Timeline
lib/Bitcode/Reader/BitcodeReader.cpp | ||
---|---|---|
5644 | Maybe a comment here and in the below case that for the combined index the original name comes from a separate bitcode record (which is why both are set to the same GUID)? | |
5896 | Don't FS_ALIAS and FS_PERMODULE_GLOBALVAR_INIT_REFS need to setOriginalName as well? |
LGTM, except I have one concern about the test, noted below.
test/Bitcode/thinlto-function-summary-originalnames.ll | ||
---|---|---|
16 | These GUIDs (not the original ones above) might be dangerous to put here as they include the path to the module (which I believe could vary on some bots). |
test/Bitcode/thinlto-function-summary-originalnames.ll | ||
---|---|---|
16 | I added them back, after defining the "source_filename" in the IR. |
Maybe a comment here and in the below case that for the combined index the original name comes from a separate bitcode record (which is why both are set to the same GUID)?