From 69dddfe26836d246cd08126cc39376db02e95626 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 25 Sep 2019 22:35:47 +0000 Subject: [PATCH] [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 llvm-svn: 372924 --- llvm/lib/Transforms/Scalar/LICM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 52ff7cb..7075681 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/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"); -- 2.7.4