<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 12 June 2017 at 18:54, Diana Picus <span dir="ltr"><<a href="mailto:diana.picus@linaro.org" target="_blank">diana.picus@linaro.org</a>></span> wrote:<br><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">Hi all,<div><br></div><div>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><br></div></div></blockquote><div><br></div><div>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><div><br></div><div>PAQ8p:</div><div>Fast isel: 666.344</div><div>Global isel: 731.384</div><div><br></div><div>SciMark2-C:</div><div>Fast isel: 463.908</div><div>Global isel: 496.22</div></div><div><br></div><div>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><br></div><div>Something along these lines works:</div><div><a href="https://reviews.llvm.org/differential/diff/102547/" target="_blank">https://reviews.llvm.org/<wbr>differential/diff/102547/</a><br></div><div><br></div><div>What do you guys think about this approach?</div><div><br></div><div>Thanks,</div><div>Diana</div><div><br></div><div>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> </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"><div></div><div>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><br></div><div>Cheers,</div><div>Diana</div><div><br></div><div>[1] <a href="http://master2.llvm.validation.linaro.org/builders/clang-cmake-aarch64-global-isel" target="_blank">http://master2.llvm.valida<wbr>tion.linaro.org/builders/<wbr>clang-cmake-aarch64-global-<wbr>isel</a></div><div><br></div></div><div class="m_-7097211521367447438gmail-HOEnZb"><div class="m_-7097211521367447438gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On 6 June 2017 at 19:11, Quentin Colombet <span dir="ltr"><<a href="mailto:qcolombet@apple.com" target="_blank">qcolombet@apple.com</a>></span> wrote:<br><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"><div>Thanks Kristof.</div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature"><br></div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature">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"><br></div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature">At this point I think everybody is on board to flip the switch.</div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature">@Eric, how does that sound to you?</div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature"><br></div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature">Thanks,</div><div id="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109AppleMailSignature">Q</div><div><div class="m_-7097211521367447438gmail-m_3330325668010675555h5"><div><br>Le 1 juin 2017 à 07:46, Kristof Beyls <<a href="mailto:Kristof.Beyls@arm.com" target="_blank">Kristof.Beyls@arm.com</a>> a écrit :<br><br></div><blockquote type="cite"><div>




<br>
<div>
<blockquote type="cite">
<div>On 31 May 2017, at 17:07, Quentin Colombet <<a href="mailto:qcolombet@apple.com" target="_blank">qcolombet@apple.com</a>> wrote:</div>
<div>
<div style="word-wrap:break-word">
<div>
<div>
<blockquote type="cite">
<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">
<br>
</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">
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">
* 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><br>
</div>
<div>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>What is the biggest offender?</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>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>When using -ftime-report, I see the Localizer pass typically taking very roughly about 1% of compile time.</div>
<div>Maybe another part of GlobalISel became a bit slower since I did that 3.5% measurement?</div>
<div>Or maybe the Localizer pass changes the structure of the program so that another later pass gets a different compile time profile?</div>
<div>Basically, I'd have to do more experiments to figure that one out.</div>
<div><br>
</div>
<div>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>
<div><font face="Menlo">Avg compile time spent in IRTranslator: 4.61%</font></div>
<div><font face="Menlo">Avg compile time spent in InstructionSelect: 7.51%</font></div>
<div><font face="Menlo">Avg compile time spent in Legalizer: 1.06%</font></div>
<div><font face="Menlo">Avg compile time spent in Localizer: 0.76%</font></div>
<div><font face="Menlo">Avg compile time spent in RegBankSelect: 2.12%</font></div>
</div>
<br>
<blockquote type="cite">
<div>
<div style="word-wrap:break-word">
<div>
<div><br>
<blockquote type="cite">
<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">
* 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">
* Code size: 3.14% larger. This was about 2.8% before the Localizer pass landed, so a slight regression.</div>
</div>
</blockquote>
<div><br>
</div>
<div>That one is surprising. Do you have an idea of what is happening?</div>
<div>Alternatively if you can point me to the biggest offender, I can have a look.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>So the biggest offenders on the mem_bytes metric in LNT are:</div>
<div>
<table border="0" cellpadding="0" cellspacing="0" width="641" style="border-collapse:collapse;width:641pt">
<colgroup><col width="381" style="width:381pt"><col width="65" span="4" style="width:65pt"></colgroup>
<tbody>
<tr height="15" style="height:15pt">
<td height="15" width="381" style="height:15pt;width:381pt"></td>
<td width="65" style="width:65pt"><font size="2">O0 -g</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl68" width="65" style="width:65pt;box-sizing:content-box"><font size="2">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">O0 -g gisel-without-localizer</font></td>
</tr>
<tr height="17" style="height:17pt">
<td height="17" class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl66" style="height:17pt;box-sizing:content-box"><font size="2">SingleSource/Benchmarks/Misc/p<wbr>erlin</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">14272</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">14640</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">18344</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl67" align="right"><font size="2">25.95%</font></td>
</tr>
<tr height="17" style="height:17pt">
<td height="17" class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl66" style="height:17pt;box-sizing:content-box"><font size="2">SingleSource/Benchmarks/Dhryst<wbr>one/dry</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">16560</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">17144</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">20160</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl67" align="right"><font size="2">18.21%</font></td>
</tr>
<tr height="17" style="height:17pt">
<td height="17" class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl66" style="height:17pt;box-sizing:content-box"><font size="2">SingleSource/Benchmarks/Stanfo<wbr>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">13912</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">14192</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">15136</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl67" align="right"><font size="2">6.79%</font></td>
</tr>
<tr height="17" style="height:17pt">
<td height="17" class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl66" style="height:17pt;box-sizing:content-box"><font size="2">MultiSource/Benchmarks/Trimara<wbr>n/netbench-url/netbench-url</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">71400</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">72272</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">75504</font></td>
<td class="m_-7097211521367447438gmail-m_3330325668010675555m_1627034621832524109xl67" align="right"><font size="2">4.53%</font></td>
</tr>

</tbody>
</table>
</div>
<div><br>
</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><br>
<blockquote type="cite">
<div>
<div style="word-wrap:break-word">
<div>
<div>
<div><br>
</div>
<div>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>


</div></blockquote></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>