diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2018-08-28 00:32:32 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2018-08-28 00:32:32 +0000 |
commit | 6a9aa02ff3c4a6bfbcb2caa7955e881c99c4ab6c (patch) | |
tree | e48c83cada0c2d850c6b33e2569d9db71baafdc9 /llvm/lib/Analysis/MemorySSA.cpp | |
parent | dfa7755c52b61fb5a53110a12eb5a8351be05f17 (diff) | |
download | llvm-6a9aa02ff3c4a6bfbcb2caa7955e881c99c4ab6c.zip llvm-6a9aa02ff3c4a6bfbcb2caa7955e881c99c4ab6c.tar.gz llvm-6a9aa02ff3c4a6bfbcb2caa7955e881c99c4ab6c.tar.bz2 |
[MemorySSA] Add NDEBUG checks to verifiers; NFC
verify*() methods are intended to have no side-effects (unless we detect
broken MSSA, in which case they assert()), and all of the other verify
methods are wrapped by `#ifndef NDEBUG`.
llvm-svn: 340793
Diffstat (limited to 'llvm/lib/Analysis/MemorySSA.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemorySSA.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp index 3eab719..cbdbb98 100644 --- a/llvm/lib/Analysis/MemorySSA.cpp +++ b/llvm/lib/Analysis/MemorySSA.cpp @@ -1711,6 +1711,7 @@ void MemorySSA::verifyDominationNumbers(const Function &F) const { /// Verify that the order and existence of MemoryAccesses matches the /// order and existence of memory affecting instructions. void MemorySSA::verifyOrdering(Function &F) const { +#ifndef NDEBUG // Walk all the blocks, comparing what the lookups think and what the access // lists think, as well as the order in the blocks vs the order in the access // lists. @@ -1769,6 +1770,7 @@ void MemorySSA::verifyOrdering(Function &F) const { } ActualDefs.clear(); } +#endif } /// Verify the domination properties of MemorySSA by checking that each @@ -1811,6 +1813,7 @@ void MemorySSA::verifyUseInDefs(MemoryAccess *Def, MemoryAccess *Use) const { /// accesses and verifying that, for each use, it appears in the /// appropriate def's use list void MemorySSA::verifyDefUses(Function &F) const { +#ifndef NDEBUG for (BasicBlock &B : F) { // Phi nodes are attached to basic blocks if (MemoryPhi *Phi = getMemoryAccess(&B)) { @@ -1831,6 +1834,7 @@ void MemorySSA::verifyDefUses(Function &F) const { } } } +#endif } /// Perform a local numbering on blocks so that instruction ordering can be |