<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="">Hi Kristof,<div class=""><br class=""></div><div class="">Thanks for the measurements.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 24, 2017, at 6:00 AM, Kristof Beyls <<a href="mailto:kristof.beyls@arm.com" class="">kristof.beyls@arm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><br class="Apple-interchange-newline">On 23 May 2017, at 21:48, Quentin Colombet <<a href="mailto:qcolombet@apple.com" class="">qcolombet@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Great!</span><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I thought I had to look at our pipeline at O0 to make sure optimized regalloc was supported (<a href="https://bugs.llvm.org/show_bug.cgi?id=33022" class="">https://bugs.llvm.org/show_bug.cgi?id=33022</a> in mind). Glad I was wrong, it saves me some time.</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On May 22, 2017, at 12:51 AM, Kristof Beyls <<a href="mailto:kristof.beyls@arm.com" class="">kristof.beyls@arm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><blockquote type="cite" class="">On 22 May 2017, at 09:09, Diana Picus <<a href="mailto:diana.picus@linaro.org" class="">diana.picus@linaro.org</a>> wrote:<br class=""><br class="">Hi Quentin,<br class=""><br class="">I actually did a run with -mllvm -optimize-regalloc -mllvm<br class="">-regalloc=greedy over the weekend and the test does pass with that.<br class="">Haven't measured the compile time though.<br class=""><br class="">Cheers,<br class="">Diana<br class=""></blockquote><br class="">I also did my usual benchmarking run with the same options as Diana did above:<br class="">- Comparing against -O0 without globalisel: 2.5% performance drop, 0.8% code size improvement.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">That’s compared to 9.5% performance drop and 2.8% code size regression, without that regalloc scheme, right?</div></div></div></div></blockquote><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; -webkit-text-stroke-width: 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; -webkit-text-stroke-width: 0px;" class="">Indeed.</div><br class="" 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; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="">- Comparing against -O0 without globalisel but with the above regalloc options: 5.6% performance drop, 1% code size drop.<br class=""><br class="">In summary, the measurements indicate some good improvements.<br class="">I also haven't measure the impact on compile time.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Do you have a mean to make this measurement?</div><div class="">Ahmed did a bunch of compile time measurements on our side and I wanted to see if I need to put him on the hook again :).</div></div></div></div></blockquote><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; -webkit-text-stroke-width: 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; -webkit-text-stroke-width: 0px;" class="">I did a quick setup with CTMark (part of the test-suite). I ran each of</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; -webkit-text-stroke-width: 0px;" class="">* '-O0 -g',</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; -webkit-text-stroke-width: 0px;" class="">* '-O0 -g -mllvm -global-isel=true -mllvm -global-isel-abort=0', and</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; -webkit-text-stroke-width: 0px;" class="">* '-O0 -g -mllvm -global-isel=true -mllvm -global-isel-abort=0 -mllvm -optimize-regalloc -mllvm -regalloc=greedy'</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; -webkit-text-stroke-width: 0px;" class="">5 times, cross-compiling from X86 to AArch64, and took the median measured compile times.</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; -webkit-text-stroke-width: 0px;" class="">In summary, I see GlobalISel having a compile time that's 3.5% higher than the current -O0 default.</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; -webkit-text-stroke-width: 0px;" class="">With enabling the greedy register allocator, this increases to 28%.</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; -webkit-text-stroke-width: 0px;" class="">28% is probably too high?</div></div></blockquote><div><br class=""></div><div>I think it is yes.</div><div>I have attached a quick hack to the greedy allocator to feature a fast mode.</div><div>Could you give it a try?</div><div><br class=""></div><div>To enable the fast mode, please use (-mllvm) <font face="Menlo" style="font-size: 11px;" class="">-regalloc-greedy-fast=true</font> (default is false).</div><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; -webkit-text-stroke-width: 0px;" class=""> At the moment I can't think of an alternative to having a "constant materialization localizer" pass at -O0 to hit all the metrics we thought of as necessary before enabling GISel by default.</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; -webkit-text-stroke-width: 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; -webkit-text-stroke-width: 0px;" class="">It would be good if someone else could also do a compilation time experiment - just to make sure I didn't make any silly mistakes in my experiment.</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; -webkit-text-stroke-width: 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; -webkit-text-stroke-width: 0px;" class="">Here are the details I see:</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; -webkit-text-stroke-width: 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; -webkit-text-stroke-width: 0px;" class=""><table border="0" cellpadding="0" cellspacing="0" width="424" class="" style="border-collapse: collapse; width: 424pt;"><colgroup class=""><col width="304" class="" style="width: 304pt;"><col width="46" class="" style="width: 46pt;"><col width="74" class="" style="width: 74pt;"></colgroup><tbody class=""><tr height="15" class="" style="height: 15pt;"><td height="15" width="304" class="" style="text-align: right; height: 15pt; width: 304pt; box-sizing: content-box;"></td><td class="xl66" width="46" style="text-align: right; width: 46pt;"><span class="" style="font-size: 12px;"><b class="">gisel</b></span></td><td class="xl66" width="74" style="text-align: right; width: 74pt;"><span class="" style="font-size: 12px;"><b class="">gisel+greedy</b></span></td></tr><tr height="17" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/7zip/7zip-benchmark</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">102.8%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">106.5%</span></td></tr><tr height="17" role="row" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/Bullet/bullet</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">100.5%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">105.1%</span></td></tr><tr height="17" role="row" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/ClamAV/clamscan</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">101.6%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">130.8%</span></td></tr><tr height="17" role="row" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/SPASS/SPASS</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">101.2%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">120.0%</span></td></tr><tr height="17" role="row" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/consumer-typeset/consumer-typeset</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">105.7%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">138.2%</span></td></tr><tr height="17" role="row" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/kimwitu++/kc</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">103.1%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">122.6%</span></td></tr><tr height="17" role="row" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/lencod/lencod</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">106.2%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">143.4%</span></td></tr><tr height="17" role="row" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/mafft/pairlocalalign</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">96.2%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">135.4%</span></td></tr><tr height="17" role="row" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/sqlite3/sqlite3</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">109.1%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">155.1%</span></td></tr><tr height="17" role="row" class="" style="height: 17pt;"><td height="17" class="" style="height: 17pt; box-sizing: content-box;"><span class="" style="font-size: 12px;">CTMark/tramp3d-v4/tramp3d-v4</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">109.1%</span></td><td class="xl64" align="right"><span class="" style="font-size: 12px;">132.0%</span></td></tr><tr height="15" class="" style="height: 15pt;"><td height="15" class="" style="height: 15pt; box-sizing: content-box;"><span class="" style="font-size: 12px;"><b class="">GEOMEAN</b></span></td><td class="xl65" align="right"><span class="" style="font-size: 12px;"><b class="">103.5%</b></span></td><td class="xl65" align="right"><span class="" style="font-size: 12px;"><b class="">128.0%</b></span></td></tr></tbody></table></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; -webkit-text-stroke-width: 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; -webkit-text-stroke-width: 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; -webkit-text-stroke-width: 0px;" class="">Thanks,</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; -webkit-text-stroke-width: 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; -webkit-text-stroke-width: 0px;" class="">Kristof</div></div></blockquote></div><br class=""></div><div class="">Thanks,</div><div class="">-Quentin</div><div class=""></div></body></html>