[MemorySSA] Ensure address stability of MemorySSA object.
authorGeoff Berry <gberry@codeaurora.org>
Mon, 8 Aug 2016 17:52:01 +0000 (17:52 +0000)
committerGeoff Berry <gberry@codeaurora.org>
Mon, 8 Aug 2016 17:52:01 +0000 (17:52 +0000)
commitcdf5333f6f89d4c5260a3ea25e299821ed8e8f94
tree27ea436f1b542924ba0127de7448e036252ae263
parent3ee803a89587d37c1f5aa11d044bf036549f7aa1
[MemorySSA] Ensure address stability of MemorySSA object.

Summary:
Ensure that the MemorySSA object never changes address when using the
new pass manager since the walkers contained by MemorySSA cache pointers
to it at construction time.  This is achieved by wrapping the
MemorySSAAnalysis result in a unique_ptr.  Also add some asserts that
check for this bug.

Reviewers: george.burgess.iv, dberlin

Subscribers: mcrosier, hfinkel, chandlerc, silvas, llvm-commits

Differential Revision: https://reviews.llvm.org/D23171

llvm-svn: 278028
llvm/include/llvm/Transforms/Utils/MemorySSA.h
llvm/lib/Transforms/Utils/MemorySSA.cpp