[PATCH] D18494: ThinLTO: add module caching handling.

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 07:47:54 PDT 2016


tejohnson added inline comments.

================
Comment at: lib/LTO/ThinLTOCodeGenerator.cpp:334
@@ +333,3 @@
+      Hasher.write((const char *)&ModHash[0], sizeof(ModHash));
+    }
+
----------------
joker.eph wrote:
> joker.eph wrote:
> > Unfortunately this is not enough to handle internalization, or linkonce_odr optimization like in D18346, I'll have to give more thought about it.
> Another issue is that promotion will rename later a global with a name that will different between two different links if the object is not in the same position. The hashing here does not account for this unfortunately. 
> It seems like an intrinsically hard problem to solve (unless we give-up on sharing objects across two different links)
> Unfortunately this is not enough to handle internalization, or linkonce_odr optimization like in D18346, I'll have to give more thought about it.

For the linkonce optimization, how about compute and hash the set of isFirstDefinitionForLinker entries for this module? That is solely based off of summaries.



http://reviews.llvm.org/D18494





More information about the llvm-commits mailing list