Wael Yehia via llvm-dev
2019-Aug-25 13:34 UTC
[llvm-dev] [RFC] Adding target-specific overrides for Indirect Call Promotion (ICP)
<font face="Verdana,Arial,Helvetica,sans-serif" size="2"><div style=""><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;">Hi Teresa,</div><div style=""><div style=""><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> -icp-max-annotations=7</font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> -icp-max-prom=7</font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> -icp-remaining-percent-threshold=10</font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif" size="2">are the values that shown improvement on Power9. Please see my reply to Hal Finkel in this thread for more details.<br></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Wael</font></div></div></div><br><br><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" color="#000000" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;"><font color="#990099">-----Teresa Johnson <<a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a>> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">To: Wael Yehia <<a href="mailto:wyehia@ca.ibm.com" target="_blank">wyehia@ca.ibm.com</a>><br>From: Teresa Johnson <<a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a>><br>Date: 08/24/2019 11:22AM<br>Cc: llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>Subject: [EXTERNAL] Re: [RFC] Adding target-specific overrides for Indirect Call Promotion (ICP)<br><br><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="font-family: sans-serif; font-size: small;"><font color="#555555"></font><td style="border-top:2px solid rgb(213,15,37)">Teresa Johnson |</td><td style="border-top:2px solid rgb(51,105,232)"> Software Engineer |</td><td style="border-top:2px solid rgb(0,153,57)"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td style="border-top:2px solid rgb(238,178,17)"><br></td></tr></tbody></table></span></div></div></div></div></div></div></font></font><BR>
Teresa Johnson via llvm-dev
2019-Aug-25 15:08 UTC
[llvm-dev] [RFC] Adding target-specific overrides for Indirect Call Promotion (ICP)
Ok, thanks. For some odd reason I got two copies of the original email, so I missed Hal and your responses. Let's continue on that thread. Teresa On Sun, Aug 25, 2019 at 6:34 AM Wael Yehia <wyehia at ca.ibm.com> wrote:> Hi Teresa, > -icp-max-annotations=7 > -icp-max-prom=7 > -icp-remaining-percent-threshold=10 > are the values that shown improvement on Power9. Please see my reply to > Hal Finkel in this thread for more details. > > Wael > > > -----Teresa Johnson <tejohnson at google.com> wrote: ----- > To: Wael Yehia <wyehia at ca.ibm.com> > From: Teresa Johnson <tejohnson at google.com> > Date: 08/24/2019 11:22AM > Cc: llvm-dev <llvm-dev at lists.llvm.org> > Subject: [EXTERNAL] Re: [RFC] Adding target-specific overrides for > Indirect Call Promotion (ICP) > > > > On Thu, Aug 22, 2019 at 8:34 AM Wael Yehia <wyehia at ca.ibm.com> wrote: > >> Hi, >> We see improved performance on the PowerPC platform by increasing the >> aggressiveness of Indirect Call Promotion (ICP). >> In particular, lowering the promotion threshold and increasing the >> maximum number of promotions helps. >> The following command line options (default values shown) control some of >> the ICP parameters: >> -icp-max-annotations=3 >> -icp-max-prom=3 >> -icp-remaining-percent-threshold=30 >> We would like to change their defaults to a target specific value. >> > > 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. > > >> I have few questions: >> 1. Is anyone else interested in having target specific default values >> for the above options? >> > > It if makes sense from an architectural standpoint - i.e. are indirect > calls much more expensive in PowerPC than say x86? > > Teresa > > >> 2. Is anyone against making the defaults for the above options target >> dependent? >> 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: >> - teach `TargetTransformInfo` (TTI) about the above 3 values (basically >> add 3 integer-returning query functions). >> - make `PGOinstrumentationUse`, `PGOIndirectCallPromotion`, and >> `ModuleSummaryIndexAnalysis` passes require the `TargetIRAnalysis` pass so >> that they can access the TTI instance, and pass it to >> `ICallPromotionAnalysis`. >> The legacy PM passes would be changed symmetrically. >> >> Thank you. >> >> Wael Yehia >> Compiler Development >> IBM Canada Lab >> wyehia at ca.ibm.com >> >> > > -- > Teresa Johnson | Software Engineer | tejohnson at google.com | > >-- Teresa Johnson | Software Engineer | tejohnson at google.com | -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190825/1da11640/attachment.html>