<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 03/24/2015 05:07 PM, Daniel Berlin
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAF4BwTVywR9apFFoXDrES0j_-C2eNxhQs2t+SWGATh9yAnvfHg@mail.gmail.com"
      type="cite">
      <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 moz-do-not-send="true"
                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>
        </div>
      </div>
    </blockquote>
    Do you think this would this actually be a performance problem? 
    Particularly once we start using this is multiple passes and
    preserving it across them, it's not clear to me how expensive the
    current form will actually be.  <br>
    <blockquote
cite="mid:CAF4BwTVywR9apFFoXDrES0j_-C2eNxhQs2t+SWGATh9yAnvfHg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <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>
    </blockquote>
    Either works for me.  I have no strong preference.  <br>
    <blockquote
cite="mid:CAF4BwTVywR9apFFoXDrES0j_-C2eNxhQs2t+SWGATh9yAnvfHg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <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 moz-do-not-send="true"
                    href="http://reviews.llvm.org/D7864" target="_blank">http://reviews.llvm.org/D7864</a><br>
                  <br>
                  EMAIL PREFERENCES<br>
                    <a moz-do-not-send="true"
                    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>
    </blockquote>
    <br>
  </body>
</html>