<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Oct 18, 2017 at 2:28 AM ORiordan, Martin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-IE" link="blue" vlink="purple">
<div class="m_5940334663249955135WordSection1">
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">Hi Chandler,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">I don’t track the head revisions, instead I do a “Big Bang” update with each 6-month formal release of the LLVM suite, and I am now at v5.0.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">Is the implementation of the new pass manager in LLVM v5.0 suitable for me to usefully experiment with it so as to provide feedback, or should I wait and try it out
 with v6.0?</span></p></div></div></blockquote><div><br></div><div>Unfortunately, some very important fixes landed after 5.0, and the risk was too high to cherry-pick them to fix an off-by-default feature. LLVM since the start of August is in a pretty stable state for testing this stuff.</div><div><br></div><div>-Chandler</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-IE" link="blue" vlink="purple"><div class="m_5940334663249955135WordSection1"><p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">            MartinO<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>Chandler Carruth via llvm-dev<br>
<b>Sent:</b> Wednesday, October 18, 2017 7:51 AM<br>
<b>To:</b> llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Subject:</b> [llvm-dev] RFC: Switching to the new pass manager by default<u></u><u></u></span></p></div></div><div lang="EN-IE" link="blue" vlink="purple"><div class="m_5940334663249955135WordSection1">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Greetings everyone!<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The new pass manager is getting extremely close to the point where I'm not aware of any significant outstanding work needed, and I'd like to see what else would be needed to enable it by default. Here are the current functionality I'm aware
 of outstanding:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">1) Does not do non-trivial loop unswitching. Majority of this is in
<a href="https://reviews.llvm.org/D34200" target="_blank">https://reviews.llvm.org/D34200</a> but will need one or two small follow-ups.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">2) Currently, sanitizers don't work correctly with it. Thanks to the work of others, the missing infrastructure has been added and I'll send a patch to wire this up this week.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">3) Missing support for 'optnone'. I've been working on this, but the existing testing wasn't as thorough as I wanted, so it is going slowly. I've got about 1/4 of this implemented and should have patches this week or next.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">4) Missing opt-bisect (or similar) facility. This looks pretty trivial to add, but I've not even started. If anyone is interested in it, go for it. We might even be able to do something simpler using the generic debug counters and get equivalent
 functionality.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">... that's it?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Optimization quality / run-time performance:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- We've been using it at Google extensively and are very happy with the optimization quality. Benchmarks look *very* good here.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- More data from other users would be important.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- You can try it out with `-fexperimental-new-pass-manager` to Clang<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Compile-time performance:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Sometimes *much* better due to cached analyses.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Sometimes worse, typically due to more / different inlining in turn running main pipeline (GVN + InstCombine) more times or over more code.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Overall somewhat a wash, but the increased compile times typically due to the optimizer "trying" harder, so not too concerning on our end.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Again, more feedback from other users good: `-fexperimental-new-pass-manager` to Clang<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Once the four missing things land, I'll also happily work on collecting some of the basics on the test-suite and CTMark. But I suspect more "in the wild" data would really be useful here given the significance of the change.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thoughts? What else (beyond the four items above and feedback on run-time and compile-time) would folks like to see?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Once this happens, I'll also be preparing some batch, mechanical updates to the test suite to primarily use the new pass manager. Also there is lots of documentation updates that will be needed here.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">-Chandler<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">PS: I'll be sending a note to cfe-dev as a "heads up" about this discussion as in some ways, the default flip is mostly a Clang default flip. But hopefully our doc updates will trigger this being "perceived" as the default for other frontends,
 and I'll try to reach out to other major frontends as well (Swift and Rust are on my radar, and I've already started talking with Philip Reames about their Falcon JIT).<u></u><u></u></p>
</div>
</div>
</div></div><div lang="EN-IE" link="blue" vlink="purple"><div class="m_5940334663249955135WordSection1"></div>
<p>--------------------------------------------------------------<br>
Intel Research and Development Ireland Limited<br>
Registered in Ireland<br>
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare<br>
Registered Number: 308263</p>


<p>This e-mail and any attachments may contain confidential material for the
sole use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.</p>

<p></p>
</div>

_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>