[llvm] 4e828f8 - [VPlan] Perform DT expensive input DT verification earlier (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 12:08:26 PST 2024
Author: Florian Hahn
Date: 2024-12-12T20:06:20Z
New Revision: 4e828f8d741ff61317bb1e0b67f22e274632b07a
URL: https://github.com/llvm/llvm-project/commit/4e828f8d741ff61317bb1e0b67f22e274632b07a
DIFF: https://github.com/llvm/llvm-project/commit/4e828f8d741ff61317bb1e0b67f22e274632b07a.diff
LOG: [VPlan] Perform DT expensive input DT verification earlier (NFC).
After 6c8f41d33674, DT adjustments for the skeleton are applied as VPBBs
are executed. Move input DT verification up before starting to execute
any VPBBs to avoid checking DT while the CFG and DT are in an incomplete
state.
This fixes a number of verification failures with expensive checks
enabled, including
https://lab.llvm.org/buildbot/#/builders/16/builds/10584
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 82b6282a2adf41..122dc1db0b59dc 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7774,6 +7774,10 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
VPTransformState State(&TTI, BestVF, BestUF, LI, DT, ILV.Builder, &ILV,
&BestVPlan, Legal->getWidestInductionType());
+#ifdef EXPENSIVE_CHECKS
+ assert(DT->verify(DominatorTree::VerificationLevel::Fast));
+#endif
+
// 0. Generate SCEV-dependent code into the preheader, including TripCount,
// before making any changes to the CFG.
if (!BestVPlan.getPreheader()->empty()) {
@@ -7794,10 +7798,6 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
if (VectorizingEpilogue)
VPlanTransforms::removeDeadRecipes(BestVPlan);
-#ifdef EXPENSIVE_CHECKS
- assert(DT->verify(DominatorTree::VerificationLevel::Fast));
-#endif
-
// Only use noalias metadata when using memory checks guaranteeing no overlap
// across all iterations.
const LoopAccessInfo *LAI = ILV.Legal->getLAI();
More information about the llvm-commits
mailing list