<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 2, 2017 at 3:43 PM, Kyle Butt via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">iteratee added inline comments.<br>
<span class=""><br>
<br>
================<br>
Comment at: lib/CodeGen/<wbr>MachineBlockPlacement.cpp:152<br>
+             "triangle tail duplication heuristic to kick in. 0 to disable."),<br>
+    cl::init(2),<br>
+    cl::Hidden);<br>
----------------<br>
</span><span class="">davidxl wrote:<br>
> Should the default be 3?<br>
</span>If I had found anywhere where it was likely to cause problems in my benchmarking, I would bump it to 3, but I haven't.<br></blockquote><div><br></div><div>My advice is to start with a slightly more conservative setting initially.</div><div><br></div><div>David</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
<br>
================<br>
Comment at: lib/CodeGen/<wbr>MachineBlockPlacement.cpp:1061<br>
+///    longer chains)<br>
+/// 2) The chains are statically correlated. Branch probabilities have a very<br>
+///    U-shaped distribution. If the branches in a chain are all from the same<br>
----------------<br>
</span><span class="">davidxl wrote:<br>
> 2) This is not entirely true --  it depends on the length the chain (e.g, when branch proabiity to Pdom blocks are low).  Perhaps remove 2).<br>
</span>No, It's accurate. If you know that the frequencies are correlated, but not whether they're high or low, than this is profitable. Even if the individual branch decisions are independent.<br>
<br>
If by the length of the chain, you mean that the only correlations that matter are neighbors, then that is correct and I can add a note about that.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D30309" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D30309</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>