Skip to content

Commit c055ee4

Browse files
Addressed comments
1 parent d5c696a commit c055ee4

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
@@ -1335,7 +1335,6 @@ static DenseSet<VPValue *> collectAllHeaderMasks(VPlan &Plan) {
13351335
// Walk users of wide canonical IVs and collect to all compares of the form
13361336
// (ICMP_ULE, WideCanonicalIV, backedge-taken-count).
13371337
DenseSet<VPValue *> HeaderMasks;
1338-
VPValue *BTC = Plan.getOrCreateBackedgeTakenCount();
13391338
for (auto *Wide : WideCanonicalIVs) {
13401339
for (VPUser *U : SmallVector<VPUser *>(Wide->users())) {
13411340
auto *HeaderMask = dyn_cast<VPInstruction>(U);
@@ -1387,7 +1386,7 @@ void VPlanTransforms::addActiveLaneMask(
13871386
static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
13881387
VPDominatorTree VPDT;
13891388
VPDT.recalculate(Plan);
1390-
DenseSet<VPRecipeBase *> ToRemove;
1389+
SmallVector<VPRecipeBase *> ToRemove;
13911390

13921391
ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<VPBlockBase *>> RPOT(
13931392
Plan.getEntry());
@@ -1405,14 +1404,14 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
14051404
auto *N = new VPWidenLoadEVLRecipe(L, &EVL, NewMask);
14061405
N->insertBefore(L);
14071406
L->replaceAllUsesWith(N);
1408-
ToRemove.insert(L);
1407+
ToRemove.push_back(L);
14091408
})
14101409
.Case<VPWidenStoreRecipe>([&](VPWidenStoreRecipe *S) {
14111410
VPValue *NewMask =
14121411
HeaderMasks.contains(S->getMask()) ? nullptr : S->getMask();
14131412
auto *N = new VPWidenStoreEVLRecipe(S, &EVL, NewMask);
14141413
N->insertBefore(S);
1415-
ToRemove.insert(S);
1414+
ToRemove.push_back(S);
14161415
})
14171416
.Case<VPWidenRecipe>([&](VPWidenRecipe *W) {
14181417
unsigned Opcode = W->getOpcode();
@@ -1422,7 +1421,7 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
14221421
auto *N = new VPWidenEVLRecipe(W, EVL);
14231422
N->insertBefore(W);
14241423
W->replaceAllUsesWith(N);
1425-
ToRemove.insert(W);
1424+
ToRemove.push_back(W);
14261425
});
14271426
}
14281427
}

0 commit comments

Comments
 (0)