Skip to content

Commit a2f4983

Browse files
committed
[VPlan] Remove SCEVToExpansion mapping (NFC).
VPlan::SCEVToExpansion isn't needed any longer, as SCEV expansion de-duplication is handled locally in expandSCEVs.
1 parent e960f1e commit a2f4983

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
@@ -4166,11 +4166,6 @@ class VPlan {
41664166
/// definitions are VPValues that hold a pointer to their underlying IR.
41674167
SmallVector<VPValue *, 16> VPLiveIns;
41684168

4169-
/// Mapping from SCEVs to the VPValues representing their expansions.
4170-
/// NOTE: This mapping is temporary and will be removed once all users have
4171-
/// been modeled in VPlan directly.
4172-
DenseMap<const SCEV *, VPValue *> SCEVToExpansion;
4173-
41744169
/// Blocks allocated and owned by the VPlan. They will be deleted once the
41754170
/// VPlan is destroyed.
41764171
SmallVector<VPBlockBase *> CreatedBlocks;
@@ -4427,15 +4422,6 @@ class VPlan {
44274422
LLVM_DUMP_METHOD void dump() const;
44284423
#endif
44294424

4430-
VPValue *getSCEVExpansion(const SCEV *S) const {
4431-
return SCEVToExpansion.lookup(S);
4432-
}
4433-
4434-
void addSCEVExpansion(const SCEV *S, VPValue *V) {
4435-
assert(!SCEVToExpansion.contains(S) && "SCEV already expanded");
4436-
SCEVToExpansion[S] = V;
4437-
}
4438-
44394425
/// Clone the current VPlan, update all VPValues of the new VPlan and cloned
44404426
/// recipes to refer to the clones, and return it.
44414427
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)