[PATCH] D18836: Make alias explicit in the module summary
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 22:10:41 PDT 2016
joker.eph added inline comments.
================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:2928
@@ -2919,3 +2927,3 @@
// Skip anonymous functions. We will emit a function summary for
// any aliases below.
if (!F.hasName())
----------------
tejohnson wrote:
> Comment is wrong now. With this change we will no longer get a summary emitted for anonymous functions.
Indeed. Can we just "rename" anonymous functions in the compile-phase of the ThinLTO pipeline?
Then we would just guarantee to not have any anonymous function.
================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:2964
@@ -2958,3 +2963,3 @@
static void WriteCombinedGlobalValueSummary(
- const ModuleSummaryIndex &I, BitstreamWriter &Stream,
+ const ModuleSummaryIndex &Index, BitstreamWriter &Stream,
std::map<GlobalValue::GUID, unsigned> &GUIDToValueIdMap,
----------------
tejohnson wrote:
> Do this renaming in a different NFC commit?
Will do.
================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:3120
@@ +3119,3 @@
+ NameVals.push_back(getEncodedLinkage(AS->linkage()));
+ auto AliaseeID = SummaryToOffsetMap[&AS->getAliasee()];
+ assert(AliaseeID);
----------------
tejohnson wrote:
> The name seems off - this is an offset not an ID.
Yes, I started with an ID before realizing I needed an offset, will rename.
================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:347
@@ -346,3 @@
- // linkOnceODR the linkage does not change. So we import the alias
- // and aliasee only in this case.
- const GlobalObject *GO = GV.getBaseObject();
----------------
tejohnson wrote:
> Lost this comment, I think it was useful.
Indeed, will restore!
http://reviews.llvm.org/D18836
More information about the llvm-commits
mailing list