<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 4:55 PM, Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is looking reasonable complete.  Any chance we could land it in it's current form and evolve it in tree?  Tracking changes is becoming quite hard.<br>
<br></blockquote><div>Yes, let me add some more comments, update it once more, and declare victory for the moment until someone looks at it again.</div><div><br></div><div>The one thing blocking it from being used for say, memcpyoptimizer is that it's not  *quite* lazy enough.</div><div><br></div><div>I wanted to make it pass in the list of defining blocks, and then it only computes memory ssa on the parents of this block in the dominator tree (since that is all a walk would ever return).<br></div><div><br></div><div>It could be made completely lazy by doing per-variable phi computation, as it hits the last use in a multiple-predecessor block  non-local use, as long as it gets a promise you won't modify the CFG :)</div><div><br></div><div>Then we'd just have the walker do something like Def->ensureUseComputed or something to trigger it to do insertion.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Using this to implement a simple cross block DSE might be an interesting proof of concept.  I'm not set on that idea, but it would be nice to have something in tree to show this actually working.  </blockquote><div><br></div><div>My original goal was to rewrite memcpyoptimizer, rather than write a new pass.</div><div>But i'm happy to do either :)</div><div> </div><div>I could also rewrite MergedLoadStoreMotion to use it. It would simplify the code pretty greatly, i think, since it would no longer have to look at/walk successor blocks</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Once we have that, we can migrate other passes to it one by one.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<a href="http://reviews.llvm.org/D7864" target="_blank">http://reviews.llvm.org/D7864</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>