<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
FWIW, I ran Quentin's r299283 Localizer patch (see also <font face="Menlo-Regular" class=""><span style="font-size: 11px;" class=""><a href="http://bugs.llvm.org/show_bug.cgi?id=32561" class="">http://bugs.llvm.org/show_bug.cgi?id=32561</a></span></font>) on
 my benchmark set.
<div class="">This is taking the commit in r299283 + adding the pass to the pipeline right after RegBankSelect.<br class="">
<div class="">
<div class="">
<div class=""><br class="">
</div>
<div class="">It reduces the slow-down when enabling globalisel at -O0 from 9.5% (on r302453)  to 6.3% (on r302679) in my experiments.</div>
<div class="">The code size increase also reduces from just over 2.8% to 1.8%.</div>
</div>
<div class="">I haven't measured the impact on compile-time.</div>
<div class=""><br class="">
</div>
<div class="">I think those are nice improvements; but I wouldn't hold up enabling-by-default for those improvements.</div>
<div class="">However, the increase in stack size usage being so huge that a bootstrap fails seems like something that should be addressed before enabling-by-default.</div>
<div class="">I think Diana found that when enabling r299283, the bootstrap failed with llvm-tblgen segfaulting.</div>
<div class="">So there clearly is some work required there.</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class=""><br class="">
</div>
<div class="">Kristof</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 16 May 2017, at 14:06, Diana Picus via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">Turns out it really is a GlobalISel issue - we eat up too much stack<br class="">
space because all the constants used in the switches are stored on the<br class="">
stack. We need to fix this somehow before changing the default. I'll<br class="">
try to give it a run with Quentin's r299283 on top to see if it helps.<br class="">
<br class="">
Cheers,<br class="">
Diana<br class="">
<br class="">
On 15 May 2017 at 09:38, Diana Picus <<a href="mailto:diana.picus@linaro.org" class="">diana.picus@linaro.org</a>> wrote:<br class="">
<blockquote type="cite" class="">Got another one: <a href="https://bugs.llvm.org/show_bug.cgi?id=33036" class="">
https://bugs.llvm.org/show_bug.cgi?id=33036</a><br class="">
<br class="">
I'm still investigating whether this is an actual GlobalISel issue or<br class="">
something else (I'll also start a build on a more recent revision to<br class="">
see how that behaves).<br class="">
<br class="">
On 12 May 2017 at 20:06, Eric Christopher <<a href="mailto:echristo@gmail.com" class="">echristo@gmail.com</a>> wrote:<br class="">
<blockquote type="cite" class="">Agreed. That was probably just luck before :)<br class="">
<br class="">
-eric<br class="">
<br class="">
On Fri, May 12, 2017 at 5:22 AM Diana Picus via llvm-dev<br class="">
<<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class="">
<blockquote type="cite" class=""><br class="">
It turns out that can be fixed by adding -lm to the link line, so I<br class="">
will probably convert it into a test-suite bug.<br class="">
<br class="">
I don't suppose it's crucial to handle the fabs intrinsic nicely at -O0.<br class="">
<br class="">
On 12 May 2017 at 13:44, Diana Picus <<a href="mailto:diana.picus@linaro.org" class="">diana.picus@linaro.org</a>> wrote:<br class="">
<blockquote type="cite" class="">Hi,<br class="">
<br class="">
I ran into a little snag on the test-suite:<br class="">
<a href="https://bugs.llvm.org/show_bug.cgi?id=33021" class="">https://bugs.llvm.org/show_bug.cgi?id=33021</a><br class="">
It boils down to GlobalISel generating calls to fabs instead of using<br class="">
FABSDr (so we get undefined references).<br class="">
<br class="">
Cheers,<br class="">
Diana<br class="">
<br class="">
On 11 May 2017 at 18:40, Quentin Colombet <qcolombet@apple.com> wrote:<br class="">
<blockquote type="cite" class="">Hi Diana,<br class="">
<br class="">
Thanks for the summary.<br class="">
<br class="">
On May 11, 2017, at 4:01 AM, Diana Picus <diana.picus@linaro.org><br class="">
wrote:<br class="">
<br class="">
Hi all,<br class="">
<br class="">
I'm still running some validation on this, I'll send an email when<br class="">
it's done. If that goes well I don't have anything against making the<br class="">
switch.<br class="">
<br class="">
For the record, here's a summary of issues that were deferred for<br class="">
later on (some of which are optimization-ish and we might decide to<br class="">
never do at -O0 at all):<br class="">
* Crash in RegBankSelect for half fp types:<br class="">
https://bugs.llvm.org/show_bug.cgi?id=32560<br class="">
<br class="">
<br class="">
I’ll have a look.<br class="">
<br class="">
* Improving constant placement:<br class="">
http://bugs.llvm.org/show_bug.cgi?id=32561<br class="">
<br class="">
<br class="">
I’ve commented in the PR to mention the localizer technic I was playing<br class="">
with, if someone wants to give it a try.<br class="">
<br class="">
* Fancy switch lowering<br class="">
* Transforming division-by-constant-power-of-2 into right shift<br class="">
<br class="">
<br class="">
AFAICT all the other issues that were brought up were fixed (yay!).<br class="">
<br class="">
Cheers,<br class="">
Diana<br class="">
<br class="">
<br class="">
Cheers,<br class="">
-Quentin<br class="">
<br class="">
<br class="">
<br class="">
On 11 May 2017 at 08:44, Kristof Beyls via llvm-dev<br class="">
<llvm-dev@lists.llvm.org> wrote:<br class="">
<br class="">
<br class="">
On 10 May 2017, at 17:36, Quentin Colombet <qcolombet@apple.com> wrote:<br class="">
<br class="">
<br class="">
MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/mpeg2decode (46%):<br class="">
Function<br class="">
Reference_IDCT: Probably due to creating all constants in the entry BB<br class="">
+<br class="">
spilling floating point data through an X register:<br class="">
<br class="">
FastISel:<br class="">
fadd d0, d1, d0<br class="">
str d0, [sp,#528]<br class="">
GlobalISel:<br class="">
fadd d0, d1, d0<br class="">
fmov x9, d0<br class="">
stur x9, [x29,#-48]<br class="">
<br class="">
<br class="">
Good finding, I forgot to do stores in my previous fix. I’ll do them<br class="">
shortly.<br class="">
<br class="">
<br class="">
Should be fixed by r302679<br class="">
<br class="">
<br class="">
Thanks Quentin,<br class="">
<br class="">
That reduces the slow-down when enabling globalisel at -O0 from 13% (on<br class="">
r302453)  to 9.5% (on r302679) in my experiments.<br class="">
The code size increase also reduces from just over 3% to 2.8%.<br class="">
<br class="">
Kristof<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
llvm-dev@lists.llvm.org<br class="">
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class="">
<br class="">
<br class="">
</blockquote>
</blockquote>
_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class="">
</blockquote>
</blockquote>
</blockquote>
_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>