[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
Tue Feb 24 12:11:53 PST 2015


Hi hfinkel, nlewycky,

There is no grand scheme to use this across LLVM (at least, that i have). 
The main purposees for it are to clean and speed up things like MemoryDependenceAnalysis
(which spends a lot of time walking to find use/defs of memory, etc), and to 
be able to provide load value numbering to GVN (and PRE).
Secondarily, it may be possible to speed up some of the other load/store
motion passes using it.

Note that creation of MemorySSA is linear time and space relative to the IR
size. It uses the same linear time phi placement algorithm PromoteMemoryToRegisters does
(though sadly, not the same code because abstracting PromoteMemoryToRegisters
is not easy since we don't derive the memory access classes from things
like Value, etc)

It's lived both as a utility that passes could create and delete, and as a pass.
In the current patch, it's a functionpass that things can require
as an analysis.
Happy to put it back to being a utility, not sure which makes more sense.
I only have GVN using it right now.

As a small note: The immediate-use lists are ugly right now. Suggestions for how to do
that better welcome.

Anyway, happy to answer any questions, and not looking to commit this tomorrow,
more it got to the point where i think it would be good to get some other eyes
on it.

http://reviews.llvm.org/D7864

Files:
  include/llvm/IR/Function.h
  include/llvm/InitializePasses.h
  include/llvm/Transforms/Utils/MemorySSA.h
  lib/Analysis/Analysis.cpp
  lib/IR/AsmWriter.cpp
  lib/Transforms/Utils/CMakeLists.txt
  lib/Transforms/Utils/MemorySSA.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7864.20613.patch
Type: text/x-patch
Size: 45796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150224/fe4d904f/attachment.bin>


More information about the llvm-commits mailing list