<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>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">http://master2.llvm.validation.linaro.org/builders/clang-cmake-aarch64-global-isel</a></div><div><br></div></div><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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Thanks Kristof.</div><div id="m_1627034621832524109AppleMailSignature"><br></div><div id="m_1627034621832524109AppleMailSignature">Sounds like we'll need to investigate though I'd say it is not blocking the switch.</div><div id="m_1627034621832524109AppleMailSignature"><br></div><div id="m_1627034621832524109AppleMailSignature">At this point I think everybody is on board to flip the switch.</div><div id="m_1627034621832524109AppleMailSignature">@Eric, how does that sound to you?</div><div id="m_1627034621832524109AppleMailSignature"><br></div><div id="m_1627034621832524109AppleMailSignature">Thanks,</div><div id="m_1627034621832524109AppleMailSignature">Q</div><div><div class="h5"><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:15.0pt">
<td height="15" width="381" style="height:15.0pt;width:381pt"></td>
<td width="65" style="width:65pt"><font size="2">O0 -g</font></td>
<td class="m_1627034621832524109xl68" width="65" style="width:65pt;box-sizing:content-box"><font size="2">O0 -g gisel-with-localizer</font></td>
<td class="m_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:17.0pt">
<td height="17" class="m_1627034621832524109xl66" style="height:17.0pt;box-sizing:content-box"><font size="2">SingleSource/Benchmarks/Misc/<wbr>perlin</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">14272</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">14640</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">18344</font></td>
<td class="m_1627034621832524109xl67" align="right"><font size="2">25.95%</font></td>
</tr>
<tr height="17" style="height:17.0pt">
<td height="17" class="m_1627034621832524109xl66" style="height:17.0pt;box-sizing:content-box"><font size="2">SingleSource/Benchmarks/<wbr>Dhrystone/dry</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">16560</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">17144</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">20160</font></td>
<td class="m_1627034621832524109xl67" align="right"><font size="2">18.21%</font></td>
</tr>
<tr height="17" style="height:17.0pt">
<td height="17" class="m_1627034621832524109xl66" style="height:17.0pt;box-sizing:content-box"><font size="2">SingleSource/Benchmarks/<wbr>Stanford/Queens<font class="m_1627034621832524109font5">Profile</font></font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">13912</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">14192</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">15136</font></td>
<td class="m_1627034621832524109xl67" align="right"><font size="2">6.79%</font></td>
</tr>
<tr height="17" style="height:17.0pt">
<td height="17" class="m_1627034621832524109xl66" style="height:17.0pt;box-sizing:content-box"><font size="2">MultiSource/Benchmarks/<wbr>Trimaran/netbench-url/<wbr>netbench-url</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">71400</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">72272</font></td>
<td class="m_1627034621832524109xl65" align="right" style="box-sizing:content-box"><font size="2">75504</font></td>
<td class="m_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>