Skip to content

Commit

Permalink
[LICM] Don't verify domtree/loopinfo unless EXPENSIVE_CHECKS is enabled.
Browse files Browse the repository at this point in the history
For large functions, verifying the whole function after each loop takes
non-linear time.

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

llvm-svn: 372924
  • Loading branch information
efriedma-quic committed Sep 25, 2019
1 parent 93d8726 commit 69dddfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Scalar/LICM.cpp
Expand Up @@ -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");
Expand Down

0 comments on commit 69dddfe

Please sign in to comment.