[PATCH] D24004: [ThinLTO] Indirect call promotion fixes for promoted local functions

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 14:32:03 PDT 2016

davidxl added inline comments.

Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:412
@@ +411,3 @@
+  // are removed.
+  if (PerformThinLTO)
+    MPM.add(createPGOIndirectCallPromotionLegacyPass(/*InLTO = */ true));
tejohnson wrote:
> davidxl wrote:
> > Is there PGOInstr/Annotation pass before this?
> In the compile step. PerformThinLTO is true when we are in the ThinLTO backends. See also further down where we guard the invocation of addPGOInstrPasses with !PerformThinLTO.
Ok. Can you add a comment here documenting this: with thinLTO, there are two icall promotion pass. One is in the compile phase where PerformThinLTO is false to handle intra-module calls, the other one is here that does cross module ones?


More information about the llvm-commits mailing list