Add the beginnings of an update API for preserving MemorySSA
authorDaniel Berlin <dberlin@dberlin.org>
Tue, 1 Mar 2016 18:46:54 +0000 (18:46 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Tue, 1 Mar 2016 18:46:54 +0000 (18:46 +0000)
commit83fc77b4c0d4358ae5643c687183fad28fc2bf52
treefdf1b848b77d06beb4297c3cea326e6ff742ffc9
parentf69c7e53822ecb998a5306410642691d5b70fd9b
Add the beginnings of an update API for preserving MemorySSA

Summary:
This adds the beginning of an update API to preserve MemorySSA.  In particular,
this patch adds a way to remove memory SSA accesses when instructions are
deleted.

It also adds relevant unit testing infrastructure for MemorySSA's API.

(There is an actual user of this API, i will make that diff dependent on this one.  In practice, a ton of opt passes remove memory instructions, so it's hopefully an obviously useful API :P)

Reviewers: hfinkel, reames, george.burgess.iv

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D17157

llvm-svn: 262362
llvm/include/llvm/Transforms/Utils/MemorySSA.h
llvm/lib/Transforms/Utils/MemorySSA.cpp
llvm/unittests/Transforms/Utils/CMakeLists.txt
llvm/unittests/Transforms/Utils/MemorySSA.cpp [new file with mode: 0644]