aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopPeel.cpp
diff options
context:
space:
mode:
authorStephen Long <steplong@quicinc.com>2022-03-02 09:55:35 -0800
committerEli Friedman <efriedma@quicinc.com>2022-03-02 09:56:20 -0800
commit2f6c14816abc883a5f9342182a538c39acdf0431 (patch)
treed6492956417ca88cba50898dde9b5f06093afdf3 /llvm/lib/Transforms/Utils/LoopPeel.cpp
parent324c0a72061e8337a62f9af1ffc5bf6f59b8340c (diff)
downloadllvm-2f6c14816abc883a5f9342182a538c39acdf0431.zip
llvm-2f6c14816abc883a5f9342182a538c39acdf0431.tar.gz
llvm-2f6c14816abc883a5f9342182a538c39acdf0431.tar.bz2
[LoopPeel] Add EXPENSIVE_CHECKS ifdef guard around domtree verify call
The verify call was taking 50% of the compile time in our internal LLVM fork when trying to unroll many loops. Differential Revision: https://reviews.llvm.org/D113028
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopPeel.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopPeel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopPeel.cpp b/llvm/lib/Transforms/Utils/LoopPeel.cpp
index 8f33189..609e10c 100644
--- a/llvm/lib/Transforms/Utils/LoopPeel.cpp
+++ b/llvm/lib/Transforms/Utils/LoopPeel.cpp
@@ -904,8 +904,10 @@ bool llvm::peelLoop(Loop *L, unsigned PeelCount, LoopInfo *LI,
// We modified the loop, update SE.
SE->forgetTopmostLoop(L);
+#ifdef EXPENSIVE_CHECKS
// Finally DomtTree must be correct.
assert(DT.verify(DominatorTree::VerificationLevel::Fast));
+#endif
// FIXME: Incrementally update loop-simplify
simplifyLoop(L, &DT, LI, SE, AC, nullptr, PreserveLCSSA);