<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 6, 2016 at 12:46 PM, Mehdi AMINI <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">joker.eph added inline comments.<br>
<br>
================<br>
</span>Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:383<br>
@@ -380,1 +382,3 @@<br>
+    MPM.add(createPGOIndirectCallPromotionPass());<br>
+  }<br>
<br>
----------------<br>
Why is it running twice in LTO mode?<br></blockquote><div>The first one is for intra module promotions. The second one is for cross module promotion.</div><div>The idea is to run as many promotions in pre lto compilation (until we see a cross module target -- the targets are sorted based on the counts). I think this will save compile time for parallel build. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
================<br>
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:588<br>
@@ -583,1 +587,3 @@<br>
<br>
+  // Indirect call promotion. (xur)<br>
+  PM.add(createPGOIndirectCallPromotionPass(true));<br>
----------------<br>
What is the meaning of the "xur" here?<br></blockquote><div><br></div><div>Should be removed.  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
================<br>
Comment at: lib/Transforms/Instrumentation/IndirectCallPromotion.cpp:534<br>
@@ +533,3 @@<br>
+<br>
+bool PGOIndirectCallPromotion::runOnModule(Module &M) {<br>
+  if (DisableICP)<br>
----------------<br>
Can you implement this in a utility function? I expect the "pass wrapper" to have a dummy runOnModule that would only call the public API.<br></blockquote><div>Sorry, can you explain a little more? </div><div>Do you mean I move the current in current runOnModule to a static function and call it from runOnModule?<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
<a href="http://reviews.llvm.org/D17864" rel="noreferrer" target="_blank">http://reviews.llvm.org/D17864</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>