[PATCH] D48334: [MemorySSA] Add convenience APIs in updater to avoid needing MSSA.
George Burgess IV via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 19 17:38:45 PDT 2018
george.burgess.iv accepted this revision.
george.burgess.iv added a comment.
This revision is now accepted and ready to land.
LGTM after two nits are addressed. Thank you!
================
Comment at: include/llvm/Analysis/MemorySSAUpdater.h:144
+ /// the program.
+ void removeMemoryAccess(Instruction *I) {
+ if (MemoryAccess *MA = MSSA->getMemoryAccess(I))
----------------
nit: `const Instruction *`. (`const MemoryAccess *` above might/might not make sense, but here it seems trivially correct)
================
Comment at: include/llvm/Analysis/MemorySSAUpdater.h:150
+ /// Verify MemorySSA correctness after an update
+ void verifyMemorySSA() { MSSA->verifyMemorySSA(); }
+
----------------
As discussed offline, it probably makes the most sense here to just make make a `getMemorySSA()`, rather than having `dumpMemorySSA()`/`verifyMemorySSA()`/... wrappers
(Whether `getMemorySSA` returns a `const MemorySSA *` or `MemorySSA *` is up to you; I'm happy either way).
Repository:
rL LLVM
https://reviews.llvm.org/D48334
More information about the llvm-commits
mailing list