<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 14, 2017, at 7:27 AM, Diana Picus <<a href="mailto:diana.picus@linaro.org" class="">diana.picus@linaro.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On 12 June 2017 at 18:54, Diana Picus <span dir="ltr" class=""><<a href="mailto:diana.picus@linaro.org" target="_blank" class="">diana.picus@linaro.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Hi all,<div class=""><br class=""></div><div class="">I added a buildbot [1] running the test-suite with -O0 -global-isel. It runs into the same 2 timeouts that I reported previously on this thread (paq8p and scimark2). It would be nice to make it green before flipping the switch.</div><div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">I did some more investigations on a machine similar to the one running the buildbot. For paq8p and scimark2, I get these results for O0:</div><div class=""><div class=""><br class=""></div><div class="">PAQ8p:</div><div class="">Fast isel: 666.344</div><div class="">Global isel: 731.384</div><div class=""><br class=""></div><div class="">SciMark2-C:</div><div class="">Fast isel: 463.908</div><div class="">Global isel: 496.22</div></div><div class=""><br class=""></div><div class="">The current timeout is 500s (so in this particular case we didn't hit it for scimark2, and it ran successfully to completion). I don't think the difference between FastISel and GlobalISel is too atrocious, so I would propose increasing the timeout for these 2 benchmarks. I'm not sure if we can do this on a per-bot basis, but I see some precedent for setting custom timeout thresholds for various benchmarks on different architectures (sometimes with comments that it's done so we can run O0 on that particular benchmark). </div><div class=""><br class=""></div><div class="">Something along these lines works:</div><div class=""><a href="https://reviews.llvm.org/differential/diff/102547/" target="_blank" class="">https://reviews.llvm.org/<wbr class="">differential/diff/102547/</a><br class=""></div><div class=""><br class=""></div><div class="">What do you guys think about this approach?</div></div></div></div></div></blockquote><div><br class=""></div><div>Looks reasonable to me.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Diana</div><div class=""><br class=""></div><div class="">PS: The buildbot is using the Makefiles because that's what our other AArch64 test-suite bots use. Moving all of them to CMake is a transition for another time.</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div class=""></div><div class="">At the moment, it lives in an internal buildmaster that I've setup for this purpose. If we fix it and it proves to be stable for a week or two, I'll move it to the public master.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Diana</div><div class=""><br class=""></div><div class="">[1] <a href="http://master2.llvm.validation.linaro.org/builders/clang-cmake-aarch64-global-isel" target="_blank" class="">http://master2.llvm.valida<wbr class="">tion.linaro.org/builders/<wbr class="">clang-cmake-aarch64-global-<wbr class="">isel</a></div><div class=""><br class=""></div></div><div class="m_-7097211521367447438gmail-HOEnZb"><div class="m_-7097211521367447438gmail-h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On 6 June 2017 at 19:11, Quentin Colombet <span dir="ltr" class=""><<a href="mailto:qcolombet@apple.com" target="_blank" class="">qcolombet@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto" class=""><div class="">Thanks Kristof.</div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature" class=""><br class=""></div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature" class="">Sounds like we'll need to investigate though I'd say it is not blocking the switch.</div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature" class=""><br class=""></div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature" class="">At this point I think everybody is on board to flip the switch.</div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature" class="">@Eric, how does that sound to you?</div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature" class=""><br class=""></div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature" class="">Thanks,</div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature" class="">Q</div><div class=""><div class="m_-7097211521367447438gmail-m_3330325668010675555h5"><div class=""><br class="">Le 1 juin 2017 à 07:46, Kristof Beyls <<a href="mailto:Kristof.Beyls@arm.com" target="_blank" class="">Kristof.Beyls@arm.com</a>> a écrit :<br class=""><br class=""></div><blockquote type="cite" class=""><div class="">




<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 31 May 2017, at 17:07, Quentin Colombet <<a href="mailto:qcolombet@apple.com" target="_blank" class="">qcolombet@apple.com</a>> wrote:</div>
<div class="">
<div style="word-wrap:break-word" class="">
<div class="">
<div class="">
<blockquote type="cite" class="">
<div class="">
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
<br class="">
</div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
Latest comparisons on my side, after picking up r304244, i.e. the correct Localizer pass.</div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
* CTMark compile time, comparing "-O0 -g" vs '-O0 -g -mllvm -global-isel=true -mllvm -global-isel-abort=0': about 6% increase with globalisel. This was about 3.5% before the Localizer pass landed.</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">That one is surprising too. I wouldn’t have expected this pass to show up in the compile time profile. At least not to this extend.</div>
<div class="">What is the biggest offender?</div>
</div>
</div>
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">Hmmm. So I took the 3.5% compile time overhead from my last measurement before the localizer landed, from around 24th of May.</div>
<div class="">When using -ftime-report, I see the Localizer pass typically taking very roughly about 1% of compile time.</div>
<div class="">Maybe another part of GlobalISel became a bit slower since I did that 3.5% measurement?</div>
<div class="">Or maybe the Localizer pass changes the structure of the program so that another later pass gets a different compile time profile?</div>
<div class="">Basically, I'd have to do more experiments to figure that one out.</div>
<div class=""><br class="">
</div>
<div class="">As far as where time is spent in the gisel-passes itself, on average, I saw the following on the latest CTMark experiment I ran:</div>
<div class="">
<div class=""><font face="Menlo" class="">Avg compile time spent in IRTranslator: 4.61%</font></div>
<div class=""><font face="Menlo" class="">Avg compile time spent in InstructionSelect: 7.51%</font></div>
<div class=""><font face="Menlo" class="">Avg compile time spent in Legalizer: 1.06%</font></div>
<div class=""><font face="Menlo" class="">Avg compile time spent in Localizer: 0.76%</font></div>
<div class=""><font face="Menlo" class="">Avg compile time spent in RegBankSelect: 2.12%</font></div>
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div style="word-wrap:break-word" class="">
<div class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
* My usual performance benchmarking run: 8.5% slow-down. This was about 9.5% before the Localizer pass landed, so a slight improvement.</div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
* Code size: 3.14% larger. This was about 2.8% before the Localizer pass landed, so a slight regression.</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">That one is surprising. Do you have an idea of what is happening?</div>
<div class="">Alternatively if you can point me to the biggest offender, I can have a look.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">So the biggest offenders on the mem_bytes metric in LNT are:</div>
<div class="">
<table border="0" cellpadding="0" cellspacing="0" width="641" style="border-collapse:collapse;width:641pt" class="">
<colgroup class=""><col width="381" style="width:381pt" class=""><col width="65" span="4" style="width:65pt" class=""></colgroup>
<tbody class="">
<tr height="15" style="height:15pt" class="">
<td height="15" width="381" style="height:15pt;width:381pt" class=""></td>
<td width="65" style="width:65pt" class=""><font size="2" class="">O0 -g</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl68" width="65" style="width:65pt;box-sizing:content-box"><font size="2" class="">O0 -g gisel-with-localizer</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl68" colspan="2" width="130" style="width:130pt;box-sizing:content-box">
<font size="2" class="">O0 -g gisel-without-localizer</font></td>
</tr>
<tr height="17" style="height:17pt" class="">
<td height="17" class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl66" style="height:17pt;box-sizing:content-box"><font size="2" class="">SingleSource/Benchmarks/Misc/p<wbr class="">erlin</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">14272</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">14640</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">18344</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl67" align="right"><font size="2" class="">25.95%</font></td>
</tr>
<tr height="17" style="height:17pt" class="">
<td height="17" class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl66" style="height:17pt;box-sizing:content-box"><font size="2" class="">SingleSource/Benchmarks/Dhryst<wbr class="">one/dry</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">16560</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">17144</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">20160</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl67" align="right"><font size="2" class="">18.21%</font></td>
</tr>
<tr height="17" style="height:17pt" class="">
<td height="17" class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl66" style="height:17pt;box-sizing:content-box"><font size="2" class="">SingleSource/Benchmarks/Stanfo<wbr class="">rd/Queens<font class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109font5">Profile</font></font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">13912</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">14192</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">15136</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl67" align="right"><font size="2" class="">6.79%</font></td>
</tr>
<tr height="17" style="height:17pt" class="">
<td height="17" class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl66" style="height:17pt;box-sizing:content-box"><font size="2" class="">MultiSource/Benchmarks/Trimara<wbr class="">n/netbench-url/netbench-url</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">71400</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">72272</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2" class="">75504</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl67" align="right"><font size="2" class="">4.53%</font></td>
</tr>

</tbody>
</table>
</div>
<div class=""><br class="">
</div>
I haven't had time to investigate what exact changes make the code size go up that much with the localizer pass in those cases...</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">
<div style="word-wrap:break-word" class="">
<div class="">
<div class="">
<div class=""><br class="">
</div>
<div class="">The only thing I can think of is that we duplicate constants that are expensive to materialize. If that’s the case, we were discussing with Ahmed an alternative to the localizer pass that would operate during InstructionSelect so may be worth
 pursuing.</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">


</div></blockquote></div></div></div></blockquote></div><br class=""></div>
</div></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>