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

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 17:57:42 PST 2016


mehdi_amini added a comment.

In https://reviews.llvm.org/D23488#627220, @tejohnson wrote:

> So it would have to be done during the compile step (where we could do what you suggest above). And then we put it in the summary. Although like I mentioned above, we can just flag the llvm.* variables as the live roots, that's simpler than walking all of their references and flagging them.


We could also leave the llvm.* entirely out of the summary, and just flag their reference as "used".
Another alternative is to leave the summary unchanged, and have the `computeDeadSymbols` to add to the roots `getGUID('llvm.used');` `getGUID('llvm.global_ctors'); ` etc (just get the same list as the global-dce pass.



================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:337
 
+    DEBUG(dbgs() << "Imported!\n");
     // Insert the newly imported function to the worklist.
----------------
Is this intended?


https://reviews.llvm.org/D23488





More information about the llvm-commits mailing list