Skip to content

Commit 8c29bce

Browse files
authored
[VPlan] Remove SCEVToExpansion mapping (NFC). (#164490)
VPlan::SCEVToExpansion isn't needed any longer, as SCEV expansion de-duplication is handled locally in expandSCEVs. PR: #164490
1 parent bd27abc commit 8c29bce

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4172,11 +4172,6 @@ class VPlan {
41724172
/// definitions are VPValues that hold a pointer to their underlying IR.
41734173
SmallVector<VPValue *, 16> VPLiveIns;
41744174

4175-
/// Mapping from SCEVs to the VPValues representing their expansions.
4176-
/// NOTE: This mapping is temporary and will be removed once all users have
4177-
/// been modeled in VPlan directly.
4178-
DenseMap<const SCEV *, VPValue *> SCEVToExpansion;
4179-
41804175
/// Blocks allocated and owned by the VPlan. They will be deleted once the
41814176
/// VPlan is destroyed.
41824177
SmallVector<VPBlockBase *> CreatedBlocks;
@@ -4424,15 +4419,6 @@ class VPlan {
44244419
LLVM_DUMP_METHOD void dump() const;
44254420
#endif
44264421

4427-
VPValue *getSCEVExpansion(const SCEV *S) const {
4428-
return SCEVToExpansion.lookup(S);
4429-
}
4430-
4431-
void addSCEVExpansion(const SCEV *S, VPValue *V) {
4432-
assert(!SCEVToExpansion.contains(S) && "SCEV already expanded");
4433-
SCEVToExpansion[S] = V;
4434-
}
4435-
44364422
/// Clone the current VPlan, update all VPValues of the new VPlan and cloned
44374423
/// recipes to refer to the clones, and return it.
44384424
VPlan *duplicate();

llvm/lib/Transforms/Vectorize/VPlanUtils.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ bool vputils::onlyScalarValuesUsed(const VPValue *Def) {
3232
}
3333

3434
VPValue *vputils::getOrCreateVPValueForSCEVExpr(VPlan &Plan, const SCEV *Expr) {
35-
if (auto *Expanded = Plan.getSCEVExpansion(Expr))
36-
return Expanded;
3735
VPValue *Expanded = nullptr;
3836
if (auto *E = dyn_cast<SCEVConstant>(Expr))
3937
Expanded = Plan.getOrAddLiveIn(E->getValue());
@@ -50,7 +48,6 @@ VPValue *vputils::getOrCreateVPValueForSCEVExpr(VPlan &Plan, const SCEV *Expr) {
5048
Plan.getEntry()->appendRecipe(Expanded->getDefiningRecipe());
5149
}
5250
}
53-
Plan.addSCEVExpansion(Expr, Expanded);
5451
return Expanded;
5552
}
5653

0 commit comments

Comments
 (0)