[PATCH] D23488: ThinLTO: add early "dead-stripping" on the Index

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 15:03:42 PST 2016


tejohnson added a comment.

In https://reviews.llvm.org/D23488#627154, @pcc wrote:

> This information will probably need to be encoded in the summary somehow once we're at the point where we no longer need to load the module during symbol resolution.


At that point we will have a separately loadable symbol table in the bitcode file, but there again I guess we will not know anything about these llvm.* symbols in the table, right?

> I think at this point we just need to collect a set of GC roots in add{Regular,Thin}LTO in the same way that we collect the set of used variables with collectUsedGlobalVariables.

Presumably using a new flag added to the summary, right? Or did you have a different approach in mind for now?

Right now the patch uses the set of preserved GUIDs computed from the GlobalResolution info as the roots in runThinLTO (see invocation of computeDeadSymbols). So probably we would just use the summary flag in computeDeadSymbols to add to the set of preserved GUIDs passed in. I.e. not in addThinLTO (this is for index-based internalization/dead stripping, so I don't think regular LTO comes into play).


https://reviews.llvm.org/D23488





More information about the llvm-commits mailing list