<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Jan 30, 2017 at 3:51 PM Mehdi Amini via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Jan 30, 2017, at 10:49 AM, Dehao Chen via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_3793832598303836648Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">Currently, loop fully unroller shares the same default threshold as loop dynamic unroller and partial unroller. This seems conservative because unlike dynamic/partial unrolling, fully unrolling will not affect LSD/ICache performance. In <a href="https://reviews.llvm.org/D28368" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28368</a>, I proposed to double the threshold for loop fully unroller. This will change the codegen of several SPECCPU benchmarks:<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><p style="margin:0px 0px 12px;padding:0px;border:0px;font-family:'segoe ui','segoe ui web regular','segoe ui symbol',lato,'helvetica neue',helvetica,arial,sans-serif;font-size:13px" class="gmail_msg">Code size:<br style="margin-top:0px" class="gmail_msg">447.dealII 0.50%<br class="gmail_msg">453.povray 0.42%<br class="gmail_msg">433.milc 0.20%<br class="gmail_msg">445.gobmk 0.32%<br class="gmail_msg">403.gcc 0.05%<br class="gmail_msg">464.h264ref 3.62%</p><p style="margin:0px 0px 12px;padding:0px;border:0px;font-family:'segoe ui','segoe ui web regular','segoe ui symbol',lato,'helvetica neue',helvetica,arial,sans-serif;font-size:13px" class="gmail_msg">Compile Time:<br style="margin-top:0px" class="gmail_msg">447.dealII 0.22%<br class="gmail_msg">453.povray -0.16%<br class="gmail_msg">433.milc 0.09%<br class="gmail_msg">445.gobmk -2.43%<br class="gmail_msg">403.gcc 0.06%<br class="gmail_msg">464.h264ref 3.21%</p><p style="margin:0px 0px 12px;padding:0px;border:0px;font-family:'segoe ui','segoe ui web regular','segoe ui symbol',lato,'helvetica neue',helvetica,arial,sans-serif;font-size:13px" class="gmail_msg">Performance (on intel sandybridge):<br style="margin-top:0px" class="gmail_msg">447.dealII +0.07%<br class="gmail_msg">453.povray +1.79%<br class="gmail_msg">433.milc +1.02%<br class="gmail_msg">445.gobmk +0.56%<br class="gmail_msg">403.gcc -0.16%<br class="gmail_msg">464.h264ref -0.41%</p></div></div></div></blockquote></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"></blockquote><br class="gmail_msg"><div class="gmail_msg">Can you clarify how to read these numbers? (I’m using +xx% to indicates a slowdown usually, it seems you’re doing the opposite?).</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">So considering 464.h264ref, does it mean it is 3.6% slower to compile, gets 3.2% larger, and 0.4% slower?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Another question is about PGO integration: is it already hooked there? Should we have a more aggressive threshold in a hot function? (Assuming we’re willing to spend some binary size there but not on the cold path).</div></div></div></blockquote><div><br></div><div>I would even wire the *unrolling* the other way: just suppress unrolling in cold paths to save binary size. rolled loops seem like a generally good thing in cold code unless they are having some larger impact (IE, the loop itself is more expensive than the unrolled form).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks,</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">— </div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">Mehdi</div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><p style="margin:0px 0px 12px;padding:0px;border:0px;font-family:'segoe ui','segoe ui web regular','segoe ui symbol',lato,'helvetica neue',helvetica,arial,sans-serif;font-size:13px" class="gmail_msg">Looks like the change has overall positive performance impact with very small code size/compile time overhead. Now the question is shall we make this change default in O2, or shall we leave it in O3. We would like to have more input from the community to make the decision.</p><p style="margin:0px 0px 12px;padding:0px;border:0px;font-family:'segoe ui','segoe ui web regular','segoe ui symbol',lato,'helvetica neue',helvetica,arial,sans-serif;font-size:13px" class="gmail_msg">Thanks,</p><p style="margin:0px 0px 12px;padding:0px;border:0px;font-family:'segoe ui','segoe ui web regular','segoe ui symbol',lato,'helvetica neue',helvetica,arial,sans-serif;font-size:13px" class="gmail_msg">Dehao</p></div></div>
_______________________________________________<br class="gmail_msg">LLVM Developers mailing list<br class="gmail_msg"><a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg"><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg"></div></blockquote></div></div>_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
</blockquote></div></div>