[PATCH] D48334: [MemorySSA] Add convenience APIs in updater to avoid needing MSSA.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 19 13:54:55 PDT 2018
asbirlea updated this revision to Diff 151973.
asbirlea added a comment.
Rush edit.
Repository:
rL LLVM
https://reviews.llvm.org/D48334
Files:
include/llvm/Analysis/MemorySSAUpdater.h
Index: include/llvm/Analysis/MemorySSAUpdater.h
===================================================================
--- include/llvm/Analysis/MemorySSAUpdater.h
+++ include/llvm/Analysis/MemorySSAUpdater.h
@@ -138,6 +138,17 @@
/// on the MemoryAccess for that store/load.
void removeMemoryAccess(MemoryAccess *);
+ /// Remove MemoryAccess for a given instruction, if a MemoryAccess exists.
+ /// This should be called when an instruction (load/store) is deleted from
+ /// the program.
+ void removeMemoryAccess(Instruction *I) {
+ if (MemoryAccess *MA = MSSA->getMemoryAccess(I))
+ removeMemoryAccess(MA);
+ }
+
+ /// Verify MemorySSA correctness after an update
+ void verifyMemorySSA() { MSSA->verifyMemorySSA(); }
+
private:
// Move What before Where in the MemorySSA IR.
template <class WhereType>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48334.151973.patch
Type: text/x-patch
Size: 833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180619/56730f5b/attachment.bin>
More information about the llvm-commits
mailing list