<html><body><p><font size="2">Hi Evgeny,</font><br><br><font size="2">When you think the experiments on armv7m and armv6m targets will be complete?  We're looking to turn this on sooner rather than later, if there aren't objections from folks running on other platforms.</font><br><br><font size="2">Cheers,</font><br><br><font size="2">Graham Yiu<br>LLVM Compiler Development<br>IBM Toronto Software Lab<br>Office: (905) 413-4077      C2-707/8200/Markham<br>Email: gyiu@ca.ibm.com</font><br><br><img width="16" height="16" src="cid:1__=8FBB0B42DFCADFF68f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Graham Yiu---11/03/2017 12:40:10 PM---Hi Evgeny, Yes, please do.  It was our hope that folks would ve"><font size="2" color="#424282">Graham Yiu---11/03/2017 12:40:10 PM---Hi Evgeny, Yes, please do.  It was our hope that folks would verify the impact of the partial inline</font><br><br><font size="2" color="#5F5F5F">From:        </font><font size="2">Graham Yiu/Toronto/IBM</font><br><font size="2" color="#5F5F5F">To:        </font><font size="2">Evgeny Astigeevich <Evgeny.Astigeevich@arm.com></font><br><font size="2" color="#5F5F5F">Cc:        </font><font size="2">"junbuml@codeaurora.org" <junbuml@codeaurora.org>, "llvm-dev@lists.llvm.org" <llvm-dev@lists.llvm.org>, nd <nd@arm.com>, Tobias Grosser <tobias.grosser@inf.ethz.ch></font><br><font size="2" color="#5F5F5F">Date:        </font><font size="2">11/03/2017 12:40 PM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">Re: [llvm-dev] [RFC] Enable Partial Inliner by default</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><font size="2">Hi Evgeny,</font><br><br><font size="2">Yes, please do.  It was our hope that folks would verify the impact of the partial inliner on the platforms they're currently working on.</font><br><br><font size="2">Cheers,</font><br><br><font size="2">Graham Yiu<br>LLVM Compiler Development<br>IBM Toronto Software Lab<br>Office: (905) 413-4077      C2-707/8200/Markham<br>Email: gyiu@ca.ibm.com</font><br><br><br><img width="16" height="16" src="cid:1__=8FBB0B42DFCADFF68f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Evgeny Astigeevich ---11/03/2017 12:18:05 PM---Hi, We'd like to check impact on armv7m and armv6m tar"><font size="2" color="#424282">Evgeny Astigeevich ---11/03/2017 12:18:05 PM---Hi, We'd like to check impact on armv7m and armv6m targets, especially code size. We have not tried</font><br><br><font size="2" color="#5F5F5F">From:        </font><font size="2">Evgeny Astigeevich <Evgeny.Astigeevich@arm.com></font><br><font size="2" color="#5F5F5F">To:        </font><font size="2">Tobias Grosser <tobias.grosser@inf.ethz.ch>, Graham Yiu <gyiu@ca.ibm.com></font><br><font size="2" color="#5F5F5F">Cc:        </font><font size="2">"junbuml@codeaurora.org" <junbuml@codeaurora.org>, "llvm-dev@lists.llvm.org" <llvm-dev@lists.llvm.org>, nd <nd@arm.com></font><br><font size="2" color="#5F5F5F">Date:        </font><font size="2">11/03/2017 12:18 PM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">Re: [llvm-dev] [RFC] Enable Partial Inliner by default</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt><font size="2">Hi,<br><br><br><br>We'd like to check impact on armv7m and armv6m targets, especially code size. We have not tried the partial inliner on them.<br><br><br><br>Could a decision to turn it on by default wait for results?<br><br><br><br>Thanks,<br><br>Evgeny Astigeevich<br><br>The Arm Compiler Optimization team<br><br><br><br>-----Original Message-----<br><br>From: llvm-dev <llvm-dev-bounces@lists.llvm.org> on behalf of Tobias Grosser via llvm-dev <llvm-dev@lists.llvm.org><br><br>Reply-To: Tobias Grosser <tobias.grosser@inf.ethz.ch><br><br>Date: Thursday, 2 November 2017 at 23:32<br><br>To: Graham Yiu <gyiu@ca.ibm.com>, "llvm-dev@lists.llvm.org" <llvm-dev@lists.llvm.org><br><br>Cc: "junbuml@codeaurora.org" <junbuml@codeaurora.org><br><br>Subject: Re: [llvm-dev] [RFC] Enable Partial Inliner by default<br><br><br><br>Hi Graham,<br><br><br><br>I think this is a good idea. It is also useful for libquantum, where<br><br>together with some other changes, it enables Polly to perform libfusion.<br><br><br><br>The ARM people also played with the partial inliner and might have<br><br>feedback.<br><br><br><br>Best,<br><br>Tobias<br><br><br><br>On Thu, Nov 2, 2017, at 23:05, Graham Yiu via llvm-dev wrote:<br><br>> <br><br>> Forgot to add that all experiments were done with '-O3 -m64<br><br>> -fexperimental-new-pass-manager'.<br><br>> <br><br>> Graham Yiu<br><br>> LLVM Compiler Development<br><br>> IBM Toronto Software Lab<br><br>> Office: (905) 413-4077      C2-707/8200/Markham<br><br>> Email: gyiu@ca.ibm.com<br><br>> <br><br>> <br><br>> <br><br>> From:   Graham Yiu/Toronto/IBM<br><br>> To:     llvm-dev@lists.llvm.org<br><br>> Cc:     junbuml@codeaurora.org, xinliangli@gmail.com<br><br>> Date:   11/02/2017 05:26 PM<br><br>> Subject:        [RFC] Enable Partial Inliner by default<br><br>> <br><br>> <br><br>> Hello,<br><br>> <br><br>> I'd like to propose turning on the partial inliner<br><br>> (-enable-partial-inlining) by default.<br><br>> <br><br>> We've seen small gains on SPEC2006/2017 runtimes as well as lnt<br><br>> compile-times with a 2nd stage bootstrap of LLVM.  We also saw positive<br><br>> gains on our internal workloads.<br><br>> <br><br>> -------------------------------------<br><br>> Brief description of Partial Inlining<br><br>> -------------------------------------<br><br>> A pass in opt that runs after the normal inlining pass.  Looks for<br><br>> branches<br><br>> to a return block in the entry and immediate successor blocks of a<br><br>> function.  If found, it outlines the rest of the function using the<br><br>> CodeExtractor.  It then attempts to inline the leftover entry block (and<br><br>> possibly one or more of its successors) to all its callers.  This<br><br>> effectively peels the early return block(s) into the caller, which could<br><br>> be<br><br>> executed without incurring the call overhead of the function just to<br><br>> return<br><br>> immediately.  Inlining and call overhead cost, as well as branch<br><br>> probabilities of the return block(s) are taken into account before<br><br>> inlining<br><br>> is done.  If inlining is not successful, then the changes are discarded.<br><br>> <br><br>> eg.<br><br>> <br><br>> void foo() {<br><br>>   bar();<br><br>>   // rest of the code in foo<br><br>> }<br><br>> <br><br>> void bar() {<br><br>>   if (X)<br><br>>     return;<br><br>>   // rest of code (to be outlined)<br><br>> }<br><br>> <br><br>> After Partial Inlining:<br><br>> <br><br>> void foo() {<br><br>>   if (!X)<br><br>>     bar.outlined();<br><br>>   // rest of the code in foo<br><br>> }<br><br>> <br><br>> void bar.outlined() {<br><br>>   // rest of the code in bar<br><br>> }<br><br>> <br><br>> <br><br>> Here are the numbers on a Power8 PPCLE running Ubuntu 15.04 in ST-mode<br><br>> <br><br>> ----------------------------------------------<br><br>> Runtime performance (speed)<br><br>> ----------------------------------------------<br><br>> Workload                Improvement<br><br>> --------                -----------<br><br>> SPEC2006(C/C++) 0.06%           (geomean)<br><br>> SPEC2017(C/C++) 0.10%           (geomean)<br><br>> ----------------------------------------------<br><br>> Compile time performance for Bootstrapped LLVM<br><br>> ----------------------------------------------<br><br>> Workload                Improvement<br><br>> --------                -----------<br><br>> SPEC2006(C/C++) 0.41%           (cumulative)<br><br>> SPEC2017(C/C++) -0.16%  (cumulative)<br><br>> lnt                     0.61%           (geomean)<br><br>> ----------------------------------------------<br><br>> Compile time performance<br><br>> ----------------------------------------------<br><br>> Workload                Increase<br><br>> --------                --------<br><br>> SPEC2006(C/C++) 1.31%           (cumulative)<br><br>> SPEC2017(C/C++) 0.25%           (cumulative)<br><br>> ----------------------------------------------<br><br>> Code size<br><br>> ----------------------------------------------<br><br>> Workload                Increase<br><br>> --------                --------<br><br>> SPEC2006(C/C++) 3.90%           (geomean)<br><br>> SPEC2017(C/C++) 1.05%           (geomean)<br><br>> <br><br>> NOTE1: Code size increase in SPEC2006 was mainly attributed to benchmark<br><br>> "astar", which increased by 86%.  Removing this outlier, we get a more<br><br>> reasonable increase of 0.58%.<br><br>> <br><br>> NOTE2: There is a patch up for review on Phabricator to enhance the<br><br>> partial<br><br>> inliner with the presence of profiling information (<br><br>> </font></tt><tt><font size="2"><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D38190&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=4ST7e3kMd0GTi3w9ByK5Cw&m=sY89ox2ivgmox5Vg311rAsEr4WFT-o-LRopDU9e7rl0&s=6o17wydYZM0l4kPAb3l3cJ95JRPoYb-3l4sHv-R0GaA&e=">https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D38190&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=4ST7e3kMd0GTi3w9ByK5Cw&m=sY89ox2ivgmox5Vg311rAsEr4WFT-o-LRopDU9e7rl0&s=6o17wydYZM0l4kPAb3l3cJ95JRPoYb-3l4sHv-R0GaA&e=</a></font></tt><tt><font size="2">).<br><br>> <br><br>> <br><br>> Graham Yiu<br><br>> LLVM Compiler Development<br><br>> IBM Toronto Software Lab<br><br>> Office: (905) 413-4077      C2-707/8200/Markham<br><br>> Email: gyiu@ca.ibm.com<br><br>> <br><br>> _______________________________________________<br><br>> LLVM Developers mailing list<br><br>> llvm-dev@lists.llvm.org<br><br>> </font></tt><tt><font size="2"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=4ST7e3kMd0GTi3w9ByK5Cw&m=sY89ox2ivgmox5Vg311rAsEr4WFT-o-LRopDU9e7rl0&s=_WAS3iXS9l627yoGcLCkw5IMyoeBRXAb3ShcSIW5qjk&e=">https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=4ST7e3kMd0GTi3w9ByK5Cw&m=sY89ox2ivgmox5Vg311rAsEr4WFT-o-LRopDU9e7rl0&s=_WAS3iXS9l627yoGcLCkw5IMyoeBRXAb3ShcSIW5qjk&e=</a></font></tt><tt><font size="2"><br><br>> Email had 1 attachment:<br><br>> + graycol.gif<br><br>>   1k (image/gif)<br><br>_______________________________________________<br><br>LLVM Developers mailing list<br><br>llvm-dev@lists.llvm.org<br><br></font></tt><tt><font size="2"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=4ST7e3kMd0GTi3w9ByK5Cw&m=sY89ox2ivgmox5Vg311rAsEr4WFT-o-LRopDU9e7rl0&s=_WAS3iXS9l627yoGcLCkw5IMyoeBRXAb3ShcSIW5qjk&e=">https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=4ST7e3kMd0GTi3w9ByK5Cw&m=sY89ox2ivgmox5Vg311rAsEr4WFT-o-LRopDU9e7rl0&s=_WAS3iXS9l627yoGcLCkw5IMyoeBRXAb3ShcSIW5qjk&e=</a></font></tt><tt><font size="2"><br><br><br><br><br><br><br></font></tt><br><br><br><BR>
</body></html>