<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 25, 2016 at 8:36 AM, Geoff Berry <span dir="ltr"><<a href="mailto:gberry@codeaurora.org" target="_blank">gberry@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Sounds good.  I'll go ahead and check in what I have now (since
      it is NFC) and we can proceed from there.</p>
    <p>I'm currently trying out an approach where upon removing a store
      I eagerly re-optimize phis, but just mark uses as dirty, then only
      re-compute the clobber for dirty uses if they come up in a
      isSameMemGeneration query or at the end of the pass, which is sort
      of a hybrid of the two approaches you described.<br></p></div></blockquote><div>Okay.</div><div>Internally, I'm going to add an optimized bit that gets reset, and make the default walker only rewalk uses that are not optimized (and optimize them).</div><div><br></div><div>That way if you just call getClobberingMemoryAccess, you'd get the right answer all the time and it would only be expensive when it needs to actually be recomputed.</div><div><br></div><div>Note that this will be imperfect.</div><div>It relies on not having indirect uses (which use optimization initially guarantees).</div><div><br></div><div>That is, it relies on a given store having all of the loads that use it, have it as the clobbering definition.</div><div><br></div><div>Otherwise, when you remove/RAUW the store, you will not invalidate the full set of uses.</div><div><br></div><div><br></div><div>I will also make a batch updater that can do phi insertion and redo use optimization for pieces of memoryssa.</div><div><br></div><div>--Dan<br></div><div><br></div><div><br></div><div><br></div></div></div></div>