diff options
author | Michael Zolotukhin <mzolotukhin@apple.com> | 2018-02-07 00:13:08 +0000 |
---|---|---|
committer | Michael Zolotukhin <mzolotukhin@apple.com> | 2018-02-07 00:13:08 +0000 |
commit | ec8b0ecaab7b7334898d031149b36a7439661d55 (patch) | |
tree | 8bbde012be9a05e7510648b50c6c3ed652524e1f /llvm/lib/Analysis/LoopPass.cpp | |
parent | 16a3716db49bdba3b5dfe9061c358e8d10a2a287 (diff) | |
download | bcm5719-llvm-ec8b0ecaab7b7334898d031149b36a7439661d55.tar.gz bcm5719-llvm-ec8b0ecaab7b7334898d031149b36a7439661d55.zip |
[LCSSAVerification] Run verification only when asserts are enabled.
llvm-svn: 324429
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopPass.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index 9af717bafdc..d4e9021ee1f 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -151,7 +151,9 @@ void LPPassManager::markLoopAsDeleted(Loop &L) { 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(Function &F) { // 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); |