<div dir="ltr">I'm very concerned about adding these loops everywhere that are N^2 and require checking literally every instruction in every block to figure things out.<div><div><br></div><div>Why are we not just adding edges to an exit block or something that the CFG based algorithms will naturally see as a hoist blocker?<br></div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 6, 2016 at 2:19 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">eli.friedman created this revision.<br>
eli.friedman added reviewers: chandlerc, dberlin, reames, sanjoy.<br>
eli.friedman added a subscriber: llvm-commits.<br>
<br>
Issue exposed by noalias or more aggressive alias analysis.<br>
<br>
I'm not particularly happy with the extra loop this patch adds, but I'm<br>
not sure how to go about fixing it.<br>
<br>
I'm also not very happy with the use of mayHaveSideEffects; we only care<br>
specifically about control flow here.<br>
<br>
<a href="http://reviews.llvm.org/D21041" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21041</a><br>
<br>
Files:<br>
  lib/Transforms/Scalar/GVN.cpp<br>
  test/Transforms/GVN/pre-load.ll<br>
<br>
</blockquote></div><br></div>