<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 27, 2016 at 11:53 AM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Jan 27, 2016 at 10:50 AM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">majnemer added a comment.<br>
<span><br>
In <a href="http://reviews.llvm.org/D16637#337486" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16637#337486</a>, @dberlin wrote:<br>
<br>
> If you do it on literally every two entry phi nodes, why is the answer not:<br>
><br>
> Number each node of dominator tree with depth in dom tree (IE level).<br>
>  Process dominator tree in level order, visiting all nodes of a given level<br>
>  before the next deeper level:<br>
><br>
>   Try to speculate a given phi node.<br>
>   Stop anytime you hit a phi node with a level above you above you (because<br>
><br>
> you will have already speculated it if you could).<br>
><br>
>   Track visited phi nodes to avoid cycles.<br>
><br>
><br>
><br>
> Or something similar.<br>
>  Over time, we seem to expand a lot of lazy-walking optimizations to do<br>
>  these "walk possibly everything backwards" types of algorithms, and at the<br>
>  point we want to walk *everything of a certain type* there is no point in<br>
>  doing it lazily.<br>
<br>
<br>
</span>You will find no disagreement on this point from me :)<br>
On the other hand, there is no reason not to apply this patch. </blockquote><div><br></div></span><div>Well, there is the "if we just continuously bandaid stuff, we never force ourselves to fix it" argument</div><div>Yes, it often means someone gets asked to do a bit more work when they are just trying to fix a bug :)</div><div>So i'm not going to make it in this particular case.<br></div><div><br></div><div>I just would rather see us not add random limits, even when they are obviously what was intended, if we can avoid it altogether, and i can try to convince the submitter to take the time to do it :)</div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">I agree with this. Sorry that I only have time to apply the bandage today, but I'll add a TODO comment and try to get back here.<br></div><div class="gmail_extra"><br></div></div>