<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 22, 2019 at 8:34 AM Wael Yehia <<a href="mailto:wyehia@ca.ibm.com">wyehia@ca.ibm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="Verdana,Arial,Helvetica,sans-serif" size="2"><div><div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Hi,</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We see improved performance on the PowerPC platform by increasing the aggressiveness of Indirect Call Promotion (ICP).</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In particular, lowering the promotion threshold and increasing the maximum number of promotions helps.</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The following command line options (default values shown) control some of the ICP parameters:</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> -icp-max-annotations=3</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> -icp-max-prom=3</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> -icp-remaining-percent-threshold=30</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We would like to change their defaults to a target specific value.</font></div></div></div></font></blockquote><div><br></div><div>The above are defaults - what values are you finding are best on PowerPC? I'd be interested in trying the values you found to be optimal there again on e.g. x86 to evaluate their effectiveness. We've done various experiments and tuning of these values, but curious to try. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="Verdana,Arial,Helvetica,sans-serif" size="2"><div><div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I have few questions:</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 1. Is anyone else interested in having target specific default values for the above options?</font></div></div></div></font></blockquote><div><br></div><div>It if makes sense from an architectural standpoint - i.e. are indirect calls much more expensive in PowerPC than say x86?</div><div><br></div><div>Teresa</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="Verdana,Arial,Helvetica,sans-serif" size="2"><div><div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 2. Is anyone against making the defaults for the above options target dependent?</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 3. If I were to make the default values target dependent (but allow user specified option to trump the defaults) the question is whether the following is the best and simplest way to do it:</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> - teach `TargetTransformInfo` (TTI) about the above 3 values (basically add 3 integer-returning query functions).</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> - make `PGOinstrumentationUse`, `PGOIndirectCallPromotion`, and `ModuleSummaryIndexAnalysis` passes require the `TargetIRAnalysis` pass so that they can access the TTI instance, and pass it to `ICallPromotionAnalysis`.</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> The legacy PM passes would be changed symmetrically.</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br></font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thank you.</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br></font></div></div><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Wael Yehia</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Compiler Development</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="2">IBM Canada Lab</font><br><a href="mailto:wyehia@ca.ibm.com" style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small" target="_blank">wyehia@ca.ibm.com</a></div></font><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top:2px solid rgb(213,15,37)">Teresa Johnson |</td><td nowrap style="border-top:2px solid rgb(51,105,232)"> Software Engineer |</td><td nowrap style="border-top:2px solid rgb(0,153,57)"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top:2px solid rgb(238,178,17)"><br></td></tr></tbody></table></span></div></div></div></div>