From: Eli Friedman Date: Wed, 25 Sep 2019 22:35:47 +0000 (+0000) Subject: [LICM] Don't verify domtree/loopinfo unless EXPENSIVE_CHECKS is enabled. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e28dccc9eb2592d8012b96b352b784238d13d129;p=llvm [LICM] Don't verify domtree/loopinfo unless EXPENSIVE_CHECKS is enabled. 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 --- diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 52ff7cbcaef..7075681caba 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -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");