<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 10:23 AM, <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</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">================<br>
Comment at: lib/Transforms/Utils/MemorySSA.cpp:237<br>
@@ +236,3 @@<br>
+          break;<br>
+      } else {<br>
+        // We may have two calls<br>
----------------<br>
I had also been thinking that the logic of this else block could be moved into a utility function of AliasAnalysis. It seems to be that this is exactly what you'd want<br>
  AA->getModRefInfo(Inst1, Inst2)<br>
to mean. Do you agree?<br></blockquote><div><br></div><div><br></div><div>Yes, i completely agree.</div><div>I'll move it.</div><div><br></div><div>Somewhat apropos of this, post-"this patch", i am likely to start moving a lot of this logic into a MemorySSAWalker class or something since it's starting to grow a bit and i think philip was right that it probably should be a separate interface. </div><div>MDA also does a lot of stuff during it's walk that, at least for some users, we may want to duplicate[1]</div><div><br></div><div>When I do that I'll try to see what should be put back in AliasAnalysis (or removed. For example, it's not clear to me that callCapturesBefore really belongs there at all, it's a walking thing, and being a positional query, any AA that wants to answer it has to do walking on it's own, which seems ... wrong)</div><br class="">[1]  I"m still waffling whether MDA should use MemorySSA, or just be killed. Every user we have in tree right now would be happier with the interface memoryssa provides, with or without a few different types of walkers.  The only issue is a bit of laziness, for things like memcpyoptimizer, which is not hard to add  by doing things like "hand me the set of  things you want to query" and only build memoryssa for that.   Full laziness is possible but may not be worth it. Of course, thoughts welcome on all this.<div><br></div></div></div></div>