<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi, Wael,</p>
<p>Am I correct in assuming that the reason it makes sense for these to be target dependent is because there's on the dependence on the relative cost of checks vs. the indirect-call overhead? There's also a different from other inlining benefits, but I imagine
 that's more-weakly target dependent.</p>
<p>To what would you like to change the max-annotations value? Should this always match the max-prom value?</p>
<p> -Hal<br>
</p>
<div class="moz-cite-prefix">On 8/22/19 10:50 AM, Wael Yehia via llvm-dev wrote:<br>
</div>
<blockquote type="cite" cite="mid:OF7E6EA862.0537FB4D-ON0025845E.0056FB24-0025845E.00570017@notes.na.collabserv.com">
<font face="Verdana,Arial,Helvetica,sans-serif" size="2">
<div>
<div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2">Hi,</font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" 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 style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" 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 style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" 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 style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2">  -icp-max-annotations=3</font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2">  -icp-max-prom=3</font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2">  -icp-remaining-percent-threshold=30</font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2">We would like to change their defaults to a target specific value.</font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2">I have few questions:</font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" 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 style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2"> 2. Is anyone against making the defaults for the above options target dependent?</font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" 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 style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" 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 style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" 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 style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2">  The legacy PM passes would be changed symmetrically.</font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2"><br style="box-sizing: inherit;">
</font></div>
<div style="box-sizing: inherit;"><font style="box-sizing:
                inherit;" face="Verdana, Arial, Helvetica, sans-serif" size="2">Thank you.</font></div>
</div>
<div><br>
</div>
Wael Yehia<br>
Compiler Development<br>
IBM Canada Lab<br>
<a href="mailto:wyehia@ca.ibm.com" moz-do-not-send="true">wyehia@ca.ibm.com</a></div>
</font><br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>