<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 27, 2014 at 1:06 PM, Arnold Schwaighofer <span dir="ltr"><<a href="mailto:aschwaighofer@apple.com" target="_blank">aschwaighofer@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 id=":5wx" style="overflow:hidden">Hi Chandler,<br>
<br>
This change makes the unroller/vectorizer more conservative when used with static BFI. We will not unroll (after handling conditional stores) the hottest loop “quantum_toffoli” in libquantum (50% or so) using the static heuristic:<br>
</div></blockquote><div><br></div><div>Well... That's really surprising... That was not the intent here at all (clearly).</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":5wx" style="overflow:hidden">
<br>
  <a href="http://sourcecodebrowser.com/libquantum/0.2.4/gates_8c_source.html#l00082" target="_blank">http://sourcecodebrowser.com/libquantum/0.2.4/gates_8c_source.html#l00082</a><br>
<br>
Best,<br>
Arnold<br>
<br>
<br>
<br>
<br>
---- Block Freqs ----<br>
 entry = 1.0<br>
  entry -> if.else = 0.375<br>
  entry -> if.then = 0.625<br>
 if.then = 0.625<br>
  if.then -> if.end22 = 0.625<br>
 if.else = 0.375<br>
  if.else -> for.cond.preheader = 0.1406<br>
  if.else -> if.end22 = 0.23437<br>
 for.cond.preheader = 0.1406<br>
  for.cond.preheader -> <a href="http://for.body.lr.ph" target="_blank">for.body.lr.ph</a> = 0.08789<br>
  for.cond.preheader -> for.end = 0.05273<br>
 <a href="http://for.body.lr.ph" target="_blank">for.body.lr.ph</a> = 0.08789                   ### Preheader in question<br>
  <a href="http://for.body.lr.ph" target="_blank">for.body.lr.ph</a> -> for.body = 0.08789<br>
 for.body = 2.8125                          ### Loop in question</div></blockquote><div><br></div><div>Oh goodness. These static frequencies don't really make any sense at all. But they're also not wrong at all. ARRRRG!</div>
<div><br></div><div>Looks like we can't use a simple heuristics here even for cold regions. Do you have any better suggestions for what constitutes a cold region? Perhaps our static heuristics are also more deeply flawed than previously believed?</div>
<div><br></div><div>I'll try to think of something significantly more conservative or turn this off shortly.... this is not the intended behavior here clearly.</div></div></div></div>