[llvm] 2f6c148 - [LoopPeel] Add EXPENSIVE_CHECKS ifdef guard around domtree verify call
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 09:56:51 PST 2022
Author: Stephen Long
Date: 2022-03-02T09:56:20-08:00
New Revision: 2f6c14816abc883a5f9342182a538c39acdf0431
URL: https://github.com/llvm/llvm-project/commit/2f6c14816abc883a5f9342182a538c39acdf0431
DIFF: https://github.com/llvm/llvm-project/commit/2f6c14816abc883a5f9342182a538c39acdf0431.diff
LOG: [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
Added:
Modified:
llvm/lib/Transforms/Utils/LoopPeel.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/LoopPeel.cpp b/llvm/lib/Transforms/Utils/LoopPeel.cpp
index 8f33189a9d889..609e10c212e9d 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);
More information about the llvm-commits
mailing list