[LoopInstSimplify] Move MemorySSA verification under flag.
authorAlina Sbirlea <asbirlea@google.com>
Fri, 22 Nov 2019 00:58:37 +0000 (16:58 -0800)
committerAlina Sbirlea <asbirlea@google.com>
Fri, 22 Nov 2019 01:01:24 +0000 (17:01 -0800)
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.

llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp

index 30a71d2..9012041 100644 (file)
@@ -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))