<div dir="ltr">Ping...</div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-28 13:55 GMT+08:00 Kevin Qin <span dir="ltr"><<a href="mailto:kevinqindev@gmail.com" target="_blank">kevinqindev@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Previously, I made commit r219401 that try to enable partial & runtime unrolling on cortex-a57, but I forgot to call base TTI implementation in target specific hook, so those unrolling methods are not really enabled.</div><div><br></div><div>Here are the patch to get them enabled and 2 related patches to improve it. </div><div><br></div><div>0001 - Run LICM pass after loop unrolling pass. Runtime unrollng will introduce a runtime check in loop prologue(you can treat it as a loop preheader). If the unrolled loop is a inner loop, then the proglogue will be inside the outer loop. LICM pass can help to promote the runtime check out if the checked value is loop invariant.</div><div><br></div><div>0002 - Introduce runtime unrolling disable matadata and use it to mark the scalar loop from vectorization. Runtime unrolling is an expensive optimization which can bring benefit only if the loop is hot and iteration number is relatively large enough. For some loops, we know they are not worth to be runtime unrolled. The scalar loop from vectorization is one of the cases.</div><div><br></div><div>0003 - <span style="font-size:13.63636302948px">Enable partial & runtime </span><span style="font-size:13.63636302948px">unrolling</span><span style="font-size:13.63636302948px"> on cortex-a57, and double the unrolling threshold if the loop depth > 1. For inner one of nested loops, it is more likely to be a hot loop, and the runtime check can be promoted out from patch 0001, so the overhead is less, we can try a larger threshold to unroll more loops.</span></div><div><span style="font-size:13.63636302948px"><br></span></div><div><span style="font-size:13.63636302948px"><br></span></div><div><span style="font-size:13.63636302948px">Combined above changes together, we can get below performance and code size changes.</span></div><div><span style="font-size:13.63636302948px"><br></span></div><div><span style="font-size:13.63636302948px">Benchmark</span><span style="font-size:13.63636302948px;white-space:pre-wrap">   </span><span style="font-size:13.63636302948px">Execution time</span><span style="font-size:13.63636302948px;white-space:pre-wrap">     </span><span style="font-size:13.63636302948px">code bloat</span><br></div><div><div><span style="font-size:13.63636302948px">spec.cpu2000.179_art<span style="white-space:pre-wrap">   </span>-16.567%<span style="white-space:pre-wrap">        </span>8.805%</span></div><div><span style="font-size:13.63636302948px">spec.cpu2000.177_mesa<span style="white-space:pre-wrap">        </span>-2.771%<span style="white-space:pre-wrap"> </span>1.912%</span></div><div><span style="font-size:13.63636302948px">spec.cpu2006.483_xalancbmk<span style="white-space:pre-wrap">   </span>-2.555%<span style="white-space:pre-wrap"> </span>0.076%</span></div><div><span style="font-size:13.63636302948px">spec.cpu2000.256_bzip2<span style="white-space:pre-wrap">       </span>-1.648%<span style="white-space:pre-wrap"> </span>2.414%</span></div><div><span style="font-size:13.63636302948px">spec.cpu2006.433_milc<span style="white-space:pre-wrap">        </span>-1.228%<span style="white-space:pre-wrap"> </span>1.353%</span></div><div><span style="font-size:13.63636302948px">spec.cpu2006.456_hmmer<span style="white-space:pre-wrap">       </span>-1.079%<span style="white-space:pre-wrap"> </span>2.413%</span></div><div><span style="white-space:pre-wrap;font-size:13.63636302948px">           </span></div><div><span style="font-size:13.63636302948px">spec.cpu2006.462_libquantum<span style="white-space:pre-wrap">     </span>2.492%<span style="white-space:pre-wrap">  </span>1.482%</span></div><div><span style="font-size:13.63636302948px">spec.cpu2000.253_perlbmk<span style="white-space:pre-wrap">     </span>1.563%<span style="white-space:pre-wrap">  </span>0.464%</span></div><div><span style="font-size:13.63636302948px">spec.cpu2006.450_soplex<span style="white-space:pre-wrap">      </span>1.379%<span style="white-space:pre-wrap">  </span>1.925%</span></div><div><span style="font-size:13.63636302948px">spec.cpu2000.186_crafty<span style="white-space:pre-wrap">      </span>1.242%<span style="white-space:pre-wrap">  </span>0.005%</span></div><div><span style="white-space:pre-wrap;font-size:13.63636302948px">           </span></div><div><span style="font-size:13.63636302948px">spec.geomean    <span style="white-space:pre-wrap">      </span>-0.546%<span style="white-space:pre-wrap"> </span>0.952%</span></div></div><div><br></div><div>Please review. Thanks.</div><span class="HOEnZb"><font color="#888888"><div><div><br></div>-- <br><div><div dir="ltr">Best Regards,<div><br></div><div>Kevin Qin</div></div></div>
</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Best Regards,<div><br></div><div>Kevin Qin</div></div></div>
</div>