[llvm] fa09ddd - [LoopInstSimplify] Move MemorySSA verification under flag.

Alina Sbirlea via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 17:15:06 PST 2019


Author: Alina Sbirlea
Date: 2019-11-21T17:01:24-08:00
New Revision: fa09dddd70c557bd3e78bbeef1511e737c4b8049

URL: https://github.com/llvm/llvm-project/commit/fa09dddd70c557bd3e78bbeef1511e737c4b8049
DIFF: https://github.com/llvm/llvm-project/commit/fa09dddd70c557bd3e78bbeef1511e737c4b8049.diff

LOG: [LoopInstSimplify] Move MemorySSA verification under flag.

The verification inside loop passes should be done under the
VerifyMemorySSA flag (enabled by EXPESIVE_CHECKS or explicitly with
opt), in order to not add to compile time during regular builds.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp b/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
index 30a71d2f285e..901204181a7c 100644
--- a/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
@@ -227,7 +227,8 @@ PreservedAnalyses LoopInstSimplifyPass::run(Loop &L, LoopAnalysisManager &AM,
   Optional<MemorySSAUpdater> MSSAU;
   if (AR.MSSA) {
     MSSAU = MemorySSAUpdater(AR.MSSA);
-    AR.MSSA->verifyMemorySSA();
+    if (VerifyMemorySSA)
+      AR.MSSA->verifyMemorySSA();
   }
   if (!simplifyLoopInst(L, AR.DT, AR.LI, AR.AC, AR.TLI,
                         MSSAU.hasValue() ? MSSAU.getPointer() : nullptr))


        


More information about the llvm-commits mailing list