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

Sanjoy Das sanjoy at playingwithpointers.com
Wed Feb 25 00:07:28 PST 2015


> So, there is technically no guarantee that you will get an access that
> dominates you.

I'm unable to come up with a situation where we'd start off with
memory-def dominating memory-uses and getMemoryClobberingAccess (as it
is implemented currently) would return a non-dominating memory access.
Do you have an example where this would happen?

> This is a harder question.  If you do it to every use, you may end up
> spending a bunch of time doing that.
> You are essentially trading build time for query  time.
> If the optimization pass only asks about certain loads, it may not be a good
> tradeoff.

Makes sense, thanks!

A related question is if LLVM should cache the result of
`getClobberingMemoryAccess` in the MemoryAccess it computed the result
for (and the other MemoryAccess' it had to look at, transitively).
That seems like a good idea irrespective of how many memory ops were
queried.

-- Sanjoy



More information about the llvm-commits mailing list