Skip to content

Commit c93f029

Browse files
committed
[VPlan] Remove custom checks for EVL placement in verifier (NFCI).
After e2a72fa, def-use chains of EVL are modeled explicitly. So there's no need for a custom check of its placement, as regular def-use verification will catch mis-placements.
1 parent 10654e4 commit c93f029

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -92,50 +92,7 @@ static bool verifyVPBasicBlock(const VPBasicBlock *VPBB,
9292
for (const VPRecipeBase &R : *VPBB)
9393
RecipeNumbering[&R] = Cnt++;
9494

95-
// Set of recipe types along with VPInstruction Opcodes of all EVL-related
96-
// recipes that must appear at most once in the header block.
97-
DenseSet<unsigned> EVLFound;
98-
const VPRecipeBase *VPWidenMemRecipe = nullptr;
99-
const VPlan *Plan = VPBB->getPlan();
100-
bool IsHeader = Plan->getEntry()->getNumSuccessors() == 1 &&
101-
Plan->getVectorLoopRegion()->getEntry() == VPBB;
102-
auto CheckEVLRecipiesInsts = [&](const VPRecipeBase *R) {
103-
if (isa<VPEVLBasedIVPHIRecipe>(R)) {
104-
if (!IsHeader) {
105-
errs() << "EVL PHI recipe not in entry block!\n";
106-
return false;
107-
}
108-
if (!EVLFound.insert(VPDef::VPEVLBasedIVPHISC).second) {
109-
errs() << "EVL PHI recipe inserted more than once!\n";
110-
return false;
111-
}
112-
return true;
113-
}
114-
if (const auto *RInst = dyn_cast<VPInstruction>(R);
115-
RInst && RInst->getOpcode() == VPInstruction::ExplicitVectorLength) {
116-
if (!IsHeader) {
117-
errs() << "EVL instruction not in the header block!\n";
118-
return false;
119-
}
120-
if (!EVLFound.insert(RInst->getOpcode() + VPDef::VPLastPHISC).second) {
121-
errs() << "EVL instruction inserted more than once!\n";
122-
return false;
123-
}
124-
if (VPWidenMemRecipe) {
125-
errs() << "Use of EVL instruction by widen memory recipe before "
126-
"definition!\n";
127-
return false;
128-
}
129-
return true;
130-
}
131-
if (isa<VPWidenMemoryRecipe>(R))
132-
VPWidenMemRecipe = R;
133-
return true;
134-
};
135-
13695
for (const VPRecipeBase &R : *VPBB) {
137-
if (!CheckEVLRecipiesInsts(&R))
138-
return false;
13996
for (const VPValue *V : R.definedValues()) {
14097
for (const VPUser *U : V->users()) {
14198
auto *UI = dyn_cast<VPRecipeBase>(U);

0 commit comments

Comments
 (0)