[PATCH] D18836: Make alias explicit in the module summary

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 09:25:59 PDT 2016


tejohnson added inline comments.

================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:5845
@@ +5844,3 @@
+    // FS_ALIAS: [valueid, linkage, valueid]
+    // Aliases expect all the FP_PERMODULE to be lay down (and parsed) before
+    case bitc::FS_ALIAS: {
----------------
Maybe "Aliases must be emitted (and parsed) after all FS_PERMODULE entries, as they expect all aliasee summaries to be available." Similar for the COMBINED_ALIAS

================
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())
----------------
joker.eph wrote:
> 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.
I guess? Don't know what expectations there are for anonymous functions, but that would certainly make life easier.

================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:2929
@@ -2923,1 +2928,3 @@
+    // ThinLTO and should be renamed.
+    assert(F.hasName());
 
----------------
Won't this cause assert for anonymous function in thinlto-function-summary.ll test?


http://reviews.llvm.org/D18836





More information about the llvm-commits mailing list