[PATCH] D17115: Define the ThinLTO Pipeline

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 08:55:54 PST 2016


tejohnson added inline comments.

================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:372
@@ -358,3 +371,3 @@
 
   addPGOInstrPasses(MPM);
 
----------------
davidxl wrote:
> This needs to be run in PrepareForThinLTO. During PerformThinLTO, only cross module indirect call promotion transformation needs to be done here.
Right, this should be guarded by (!PerformThinLTO).

I think the IC promotion pass is not yet committed. But eventually we will add another round of it just after FunctionImport.

================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:396
@@ +395,3 @@
+  // unrolling/vectorization/... now. We'll first run the inliner + CGSCC passes
+  // during ThinLTO and performs the rest of the optimizations afterward.
+  if (PrepareForThinLTO)
----------------
typo: s/performs/perform/

================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:713
@@ -684,1 +712,3 @@
 
+void PassManagerBuilder::populateThinLTOPassManager(
+    legacy::PassManagerBase &PM) {
----------------
Don't we also need to do some of the LTO passes here? E.g. FunctionImporting is added in addLTOOptimizationPasses.


http://reviews.llvm.org/D17115





More information about the llvm-commits mailing list