[PATCH] D18986: [ThinLTO] Prevent importing of "llvm.used" values

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 16:57:20 PDT 2016


joker.eph added inline comments.

================
Comment at: lib/Transforms/Utils/FunctionImportUtils.cpp:219
@@ +218,3 @@
+    if (!V->hasLocalLinkage())
+      continue;
+    // We would have blocked importing from this module by suppressing index
----------------
tejohnson wrote:
> joker.eph wrote:
> > I feel we should check `GlobalsToImport` here, the client has the ability to ask for promotion for specific symbols right? 
> But as I mentioned earlier, the problem comes into play with local symbols that are not in the GlobalsToImport set (but are rather referenced by a function in the GlobalsToImport set, requiring the promotion).
`GlobalsToImport` should be renamed into `GlobalsToPromote` indeed, this is how it is intended to be used right? You already gets wrong result if you don't fill it with referenced symbols or is there some magic I missed? (I fill the "export lists" with the referenced symbols for this purpose).


http://reviews.llvm.org/D18986





More information about the llvm-commits mailing list