[PATCH] This patch introduces MemorySSA, a virtual SSA form for memory.Details on what it looks like are in MemorySSA.h

Daniel Berlin dberlin at dberlin.org
Wed Mar 4 15:40:25 PST 2015


On Thu, Mar 5, 2015 at 10:23 AM, hfinkel at anl.gov <hfinkel at anl.gov> wrote:

> ================
> Comment at: lib/Transforms/Utils/MemorySSA.cpp:237
> @@ +236,3 @@
> +          break;
> +      } else {
> +        // We may have two calls
> ----------------
> 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
>   AA->getModRefInfo(Inst1, Inst2)
> to mean. Do you agree?
>


Yes, i completely agree.
I'll move it.

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.
MDA also does a lot of stuff during it's walk that, at least for some
users, we may want to duplicate[1]

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)

[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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150305/ccc6e1a3/attachment.html>


More information about the llvm-commits mailing list