Skip to content

Commit 1a73d5c

Browse files
Addressed comments
1 parent 73f863d commit 1a73d5c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,6 @@ static DenseSet<VPValue *> collectAllHeaderMasks(VPlan &Plan) {
13561356
// Walk users of wide canonical IVs and collect to all compares of the form
13571357
// (ICMP_ULE, WideCanonicalIV, backedge-taken-count).
13581358
DenseSet<VPValue *> HeaderMasks;
1359-
VPValue *BTC = Plan.getOrCreateBackedgeTakenCount();
13601359
for (auto *Wide : WideCanonicalIVs) {
13611360
for (VPUser *U : SmallVector<VPUser *>(Wide->users())) {
13621361
auto *HeaderMask = dyn_cast<VPInstruction>(U);
@@ -1408,7 +1407,7 @@ void VPlanTransforms::addActiveLaneMask(
14081407
static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
14091408
VPDominatorTree VPDT;
14101409
VPDT.recalculate(Plan);
1411-
DenseSet<VPRecipeBase *> ToRemove;
1410+
SmallVector<VPRecipeBase *> ToRemove;
14121411

14131412
ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<VPBlockBase *>> RPOT(
14141413
Plan.getEntry());
@@ -1426,14 +1425,14 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
14261425
auto *N = new VPWidenLoadEVLRecipe(L, &EVL, NewMask);
14271426
N->insertBefore(L);
14281427
L->replaceAllUsesWith(N);
1429-
ToRemove.insert(L);
1428+
ToRemove.push_back(L);
14301429
})
14311430
.Case<VPWidenStoreRecipe>([&](VPWidenStoreRecipe *S) {
14321431
VPValue *NewMask =
14331432
HeaderMasks.contains(S->getMask()) ? nullptr : S->getMask();
14341433
auto *N = new VPWidenStoreEVLRecipe(S, &EVL, NewMask);
14351434
N->insertBefore(S);
1436-
ToRemove.insert(S);
1435+
ToRemove.push_back(S);
14371436
})
14381437
.Case<VPWidenRecipe>([&](VPWidenRecipe *W) {
14391438
unsigned Opcode = W->getOpcode();
@@ -1443,7 +1442,7 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
14431442
auto *N = new VPWidenEVLRecipe(W, EVL);
14441443
N->insertBefore(W);
14451444
W->replaceAllUsesWith(N);
1446-
ToRemove.insert(W);
1445+
ToRemove.push_back(W);
14471446
});
14481447
}
14491448
}

0 commit comments

Comments
 (0)