[llvm] [VPlan] Run more passes through `RUN_VPLAN_PASS[_NO_VERIFY]` (PR #180580)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 11 23:51:42 PST 2026
================
@@ -7429,9 +7429,10 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
// Retrieving VectorPH now when it's easier while VPlan still has Regions.
VPBasicBlock *VectorPH = cast<VPBasicBlock>(BestVPlan.getVectorPreheader());
- VPlanTransforms::optimizeForVFAndUF(BestVPlan, BestVF, BestUF, PSE);
- VPlanTransforms::simplifyRecipes(BestVPlan);
- VPlanTransforms::removeBranchOnConst(BestVPlan);
+ RUN_VPLAN_PASS_NO_VERIFY(VPlanTransforms::optimizeForVFAndUF, BestVPlan,
----------------
lukel97 wrote:
Yes but having to wrap every call site makes the code harder to read now. I wonder if there's way for us to instead annotate the passes themselves instead? Something like
```
#define VPLAN_PASS(Plan) \
scope_exit PostTransformActions { ... } \
verifyVPlanIsValid ...
void VPlanTransforms::simplifyRecipes(VPlan &Plan) {
VPLAN_PASS(Plan)
...
}
```
For the NO_VERIFY, I think we can check `Plan->vectorFactors().empty()`. I think once the VFs are added we need every transform to be valid.
https://github.com/llvm/llvm-project/pull/180580
More information about the llvm-commits
mailing list