<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 25, 2014 at 3:32 AM, Kevin Qin <span dir="ltr"><<a href="mailto:kevinqindev@gmail.com" target="_blank">kevinqindev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p class="MsoNormal">Hi Eric,</p><p class="MsoNormal"><br></p><p class="MsoNormal">Attachments show the experiment results I did on A57. I
tried 10, 20 ,30 ,40 and 50 as loop buffer size and applied my runtime prologue
simplification patch(<a href="http://reviews.llvm.org/D5147" target="_blank"><span style="font-size:10pt;font-family:Arial,sans-serif">http://reviews.llvm.org/D5147</span></a>). Then I collect execution
time, geomean code bloat and max code bloat at difference loop buffer size.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">So considering getting more performance improvement with an <span style="font-size:10pt;font-family:Arial,sans-serif">acceptable<span> </span>code
bloat, setting loop buffer size as 20 is a good choice. Maybe it’s a little conservative,
but there’s not much performance improvement from increasing it to 30 or 40, and
have to fix a huge code bloat at a larger loop buffer size which is not </span><span style="font-family:Arial,sans-serif;font-size:13.63636302947998px">acceptable</span><span style="font-family:Arial,sans-serif;font-size:13.63636302947998px"> at -O2 and below optimizaiton level.</span></p></blockquote></div><br>First question: why powers of 10? There are good reasons to use powers of 2 here -- the addressing and other arithmetic required by unrolling is often cheaper.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Second question: can you try to drill down? Specifically, what about 16? 18? 22? 24? It would be useful to essentially try to refine the precision of the curve near to current hypothesized good threshold.</div><div class="gmail_extra"><br></div><div class="gmail_extra">(At least, this was how I established the x86 partial unrolling threshold and similar other thresholds in LLVM such as the inline thresholds...)</div><div class="gmail_extra"><br></div><div class="gmail_extra">In some cases, this helps you find where the cliffs are, as the line is rarely smooth.</div></div>