]> granicus.if.org Git - llvm/commitdiff
[LICM] Don't verify domtree/loopinfo unless EXPENSIVE_CHECKS is enabled.
authorEli Friedman <efriedma@quicinc.com>
Wed, 25 Sep 2019 22:35:47 +0000 (22:35 +0000)
committerEli Friedman <efriedma@quicinc.com>
Wed, 25 Sep 2019 22:35:47 +0000 (22:35 +0000)
For large functions, verifying the whole function after each loop takes
non-linear time.

Differential Revision: https://reviews.llvm.org/D67571

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372924 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LICM.cpp

index 52ff7cbcaef2a0a5e4d9b61e24962c7b484e8ea3..7075681caba8d5ad065be2a5f4beea4bbf8289ed 100644 (file)
@@ -963,7 +963,7 @@ bool llvm::hoistRegion(DomTreeNode *N, AliasAnalysis *AA, LoopInfo *LI,
 
     // Now that we've finished hoisting make sure that LI and DT are still
     // valid.
-#ifndef NDEBUG
+#ifdef EXPENSIVE_CHECKS
   if (Changed) {
     assert(DT->verify(DominatorTree::VerificationLevel::Fast) &&
            "Dominator tree verification failed");