[llvm] r324429 - [LCSSAVerification] Run verification only when asserts are enabled.

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 16:13:08 PST 2018


Author: mzolotukhin
Date: Tue Feb  6 16:13:08 2018
New Revision: 324429

URL: http://llvm.org/viewvc/llvm-project?rev=324429&view=rev
Log:
[LCSSAVerification] Run verification only when asserts are enabled.

Modified:
    llvm/trunk/lib/Analysis/LoopPass.cpp

Modified: llvm/trunk/lib/Analysis/LoopPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopPass.cpp?rev=324429&r1=324428&r2=324429&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopPass.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopPass.cpp Tue Feb  6 16:13:08 2018
@@ -151,7 +151,9 @@ void LPPassManager::markLoopAsDeleted(Lo
 bool LPPassManager::runOnFunction(Function &F) {
   auto &LIWP = getAnalysis<LoopInfoWrapperPass>();
   LI = &LIWP.getLoopInfo();
+#ifndef NDEBUG
   DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
+#endif
   bool Changed = false;
 
   // Collect inherited analysis from Module level pass manager.
@@ -226,7 +228,7 @@ bool LPPassManager::runOnFunction(Functi
         // form (LoopPassPrinter for example). We should skip verification for
         // such passes.
         if (mustPreserveAnalysisID(LCSSAVerificationPass::ID))
-          CurrentLoop->isRecursivelyLCSSAForm(*DT, *LI);
+          assert(CurrentLoop->isRecursivelyLCSSAForm(*DT, *LI));
 
         // Then call the regular verifyAnalysis functions.
         verifyPreservedAnalysis(P);




More information about the llvm-commits mailing list