<div dir="ltr">This looks really interesting.  As my colleague Gao mentioned in his lightning talk on our LTO implementation at the last developer meeting we're definitely interested in seeing if there are any potential gains to be had by deferring passes.<div><br></div><div>I'd like to give it a try on some of our codebases, although with the Christmas break coming up and various other commitments after that in January I'm not sure when I'll be able to look at it properly.  If there is any other followup here, then please don't let that block anything from moving forward, but otherwise I'll do my best to reply here as soon as I possibly can after doing some experimentation!</div><div><br></div><div>Greg Bedwell</div><div>SN Systems - Sony Computer Entertainment Group</div><div class="gmail_extra"><br><div class="gmail_quote">On 15 December 2014 at 19:27, Daniel Stewart <span dir="ltr"><<a href="mailto:stewartd@codeaurora.org" target="_blank">stewartd@codeaurora.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><span style="color:#1f497d">I have done some preliminary investigation into postponing some of the passes to see what the resulting performance impact would be. This is a fairly crude attempt at moving passes around to see if there is any potential benefit. I have attached the patch I used to do the tests, in case anyone is interested. <u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f497d">Briefly, the patch allows two different flows, with either a flag of –lto-new or –lto-new2. In the first case, the vectorization passes are postponed from the end of populateModulePassManager() function to midway through the addLTOOptimizationPasses(). In the second case, essentially the entire populateModulePassManager() function is deferred until link time.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f497d">I ran spec2000/2006 on an ARM platform (Nexus 4), comparing 4 configurations (O3, O3 LTO, O3 LTO new, O3 LTO new 2). I have attached a PDF presenting the results from the test. The first 4 columns have the spec result (ratio) for the 4 different configurations. The second set of columns are the respective test / max(result of 4 configurations). I used this last one to see how well/poor a particular configuration was in comparison to other configurations. <u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f497d">In general, there appears to be some benefit to be gained in a couple of the benchmarks (spec2000/art, spec2006/milc) by postponing vectorization. <u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f497d">I just wanted to present this information to the community to see if there is interest in pursuing the idea of postponing passes.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f497d">Daniel<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b>From:</b> <a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a>] <b>On Behalf Of </b>Daniel Stewart<br><b>Sent:</b> Wednesday, September 17, 2014 9:46 AM<br><b>To:</b> <a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a><br><b>Subject:</b> [LLVMdev] Postponing more passes in LTO<u></u><u></u></p></div></div><div><div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Looking at the existing flow of passes for LTO, it appears that most all passes are run on a per file basis, before the call to the gold linker. I’m looking to get people’s feedback on whether there would be an advantage to waiting to run a number of these passes until the linking stage. For example, I believe I saw a post a little while back about postponing vectorization until the linking stage. It seems to me that there could be an advantage to postponing (some) passes until the linking stage, where the entire graph is available. In general, what do people think about the idea of a different flow of LTO where more passes are postponed until the linking stage? <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Daniel Stewart<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">--<u></u><u></u></p><p class="MsoNormal">Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div></div></div>