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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 13:55:17 PDT 2016


tejohnson added a comment.

In http://reviews.llvm.org/D18986#404324, @joker.eph wrote:

> Also, could we promote and rename while keeping a private alias with the old name for these globals?


No, because we could import inline assembly from two different modules, each containing a reference to a local 'myvar', and the two imported uses within the imported inline assembly need to each see the correct corresponding promoted global.


================
Comment at: include/llvm/IR/Module.h:757
@@ -751,1 +756,3 @@
+                                           bool CompilerUsed);
+
 /// An raw_ostream inserter for modules.
----------------
joker.eph wrote:
> tejohnson wrote:
> > joker.eph wrote:
> > > Why was this code-motion needed?
> > So that it can be used in lib/Analysis/ModuleSummaryAnalysis.cpp
> Oh and you can't introduce a dependency from `Analysis` to `TransformsUtil`
Right, didn't spell that out but that is the root of it. Also, as I noted in the patch description, there are several other places across LLVM that have copies of the same functionality and could use this same function if it is moved somewhere accessible. 


http://reviews.llvm.org/D18986





More information about the llvm-commits mailing list