<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 25, 2017 at 10:42 AM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><span class="">
<p><br>
</p>
<div class="m_1382906957185098004moz-cite-prefix">On 10/25/2017 12:21 PM, Xinliang David
Li wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Oct 25, 2017 at 10:19 AM, Hal
Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><span>
<p><br>
</p>
<div class="m_1382906957185098004m_3151644750661815301moz-cite-prefix">On
10/25/2017 12:16 PM, Xinliang David Li via llvm-dev
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Oct 17, 2017 at
11:50 PM, Chandler Carruth via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Greetings everyone!
<div><br>
</div>
<div>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:</div>
<div><br>
</div>
<div>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/D3420<wbr>0</a> but
will need one or two small follow-ups.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>... that's it?</div>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>Missing support of 'print-after-all' or
'print-after-passX' is another major
usability loss.</div>
<div><br>
</div>
<div>Regarding the default switch, maybe do it
in two steps: </div>
<div><br>
</div>
<div>1) Switch the default for PGO build first</div>
<div>2) Switch the default for all modes.</div>
</div>
</div>
</div>
</blockquote>
<br>
</span> Why?<span class="m_1382906957185098004HOEnZb"><font color="#888888"><br>
<br>
</font></span></div>
</blockquote>
<div><br>
</div>
<div>1) PGO users benefit from the PM change the most</div>
<div>2) I suppose incremental changes are always better and
causes fewer churns?</div>
</div>
</div>
</div>
</blockquote>
<br></span>
I'm somewhat nervous about having the PGO builds differ so much from
the non-PGO builds. My thought is that: (Significant) regressions in
execution performance or compile time need to be fixed regardless.
Maybe there's some flexibility on code-size regressions (e.g., such
that we could delay the transition for -Oz if necessary)?<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></div></blockquote><div><br></div><div>Is that another reason (Oz) we want to do the transition selectively first? For PGO, the size and compile time regression is usually not the main concerns, so it is the candidate basically with no roadblocks for adopting.</div><div><br></div><div>David</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span class="HOEnZb"><font color="#888888">
-Hal</font></span><div><div class="h5"><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>David</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><span class="m_1382906957185098004HOEnZb"><font color="#888888"> -Hal</font></span><span><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>David</div>
<div><br>
</div>
<div><br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div><br>
</div>
<div>Optimization quality / run-time
performance:</div>
<div>- We've been using it at Google
extensively and are very happy with the
optimization quality. Benchmarks look
*very* good here.</div>
<div>- More data from other users would be
important.</div>
<div>- You can try it out with
`-fexperimental-new-pass-manag<wbr>er`
to Clang</div>
<div><br>
</div>
<div>Compile-time performance:</div>
<div>- Sometimes *much* better due to
cached analyses.</div>
<div>- Sometimes worse, typically due to
more / different inlining in turn
running main pipeline (GVN +
InstCombine) more times or over more
code.</div>
<div>- Overall somewhat a wash, but the
increased compile times typically due to
the optimizer "trying" harder, so not
too concerning on our end.</div>
<div>- Again, more feedback from other
users good:
`-fexperimental-new-pass-manag<wbr>er`
to Clang</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Thoughts? What else (beyond the four
items above and feedback on run-time and
compile-time) would folks like to see?</div>
<div><br>
</div>
<div>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.</div>
<span class="m_1382906957185098004m_3151644750661815301HOEnZb"><font color="#888888">
<div><br>
</div>
<div>-Chandler</div>
</font></span>
<div><br>
</div>
<div>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).</div>
</div>
<br>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset class="m_1382906957185098004m_3151644750661815301mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
LLVM Developers mailing list
<a class="m_1382906957185098004m_3151644750661815301moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="m_1382906957185098004m_3151644750661815301moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
</span><span><pre class="m_1382906957185098004m_3151644750661815301moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</span></div>
</blockquote></div>
</div></div>
</blockquote>
<pre class="m_1382906957185098004moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre></div></div></div></blockquote></div><br></div></div>