Skip to content

Commit 5795e40

Browse files
committed
!fixup VPLiveInsToFree -> VPLiveIns.
1 parent d55e783 commit 5795e40

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ VPlan::~VPlan() {
850850
}
851851
delete VPB;
852852
}
853-
for (VPValue *VPV : VPLiveInsToFree)
853+
for (VPValue *VPV : getLiveIns())
854854
delete VPV;
855855
if (BackedgeTakenCount)
856856
delete BackedgeTakenCount;
@@ -1221,7 +1221,7 @@ VPlan *VPlan::duplicate() {
12211221
// Create VPlan, clone live-ins and remap operands in the cloned blocks.
12221222
auto *NewPlan = new VPlan(cast<VPBasicBlock>(NewEntry), NewScalarHeader);
12231223
DenseMap<VPValue *, VPValue *> Old2NewVPValues;
1224-
for (VPValue *OldLiveIn : VPLiveInsToFree) {
1224+
for (VPValue *OldLiveIn : getLiveIns()) {
12251225
Old2NewVPValues[OldLiveIn] =
12261226
NewPlan->getOrAddLiveIn(OldLiveIn->getLiveInIRValue());
12271227
}
@@ -1525,7 +1525,7 @@ void VPSlotTracker::assignNames(const VPlan &Plan) {
15251525
assignName(&Plan.VectorTripCount);
15261526
if (Plan.BackedgeTakenCount)
15271527
assignName(Plan.BackedgeTakenCount);
1528-
for (VPValue *LI : Plan.VPLiveInsToFree)
1528+
for (VPValue *LI : Plan.getLiveIns())
15291529
assignName(LI);
15301530

15311531
ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<const VPBlockBase *>>

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3565,7 +3565,7 @@ class VPlan {
35653565

35663566
/// Contains all the external definitions created for this VPlan. External
35673567
/// definitions are VPValues that hold a pointer to their underlying IR.
3568-
SmallVector<VPValue *, 16> VPLiveInsToFree;
3568+
SmallVector<VPValue *, 16> VPLiveIns;
35693569

35703570
/// Mapping from SCEVs to the VPValues representing their expansions.
35713571
/// NOTE: This mapping is temporary and will be removed once all users have
@@ -3754,7 +3754,7 @@ class VPlan {
37543754
assert(V && "Trying to get or add the VPValue of a null Value");
37553755
if (!Value2VPValue.count(V)) {
37563756
VPValue *VPV = new VPValue(V);
3757-
VPLiveInsToFree.push_back(VPV);
3757+
VPLiveIns.push_back(VPV);
37583758
assert(VPV->isLiveIn() && "VPV must be a live-in.");
37593759
assert(!Value2VPValue.count(V) && "Value already exists in VPlan");
37603760
Value2VPValue[V] = VPV;
@@ -3770,7 +3770,7 @@ class VPlan {
37703770
VPValue *getLiveIn(Value *V) const { return Value2VPValue.lookup(V); }
37713771

37723772
/// Return the list of live-in VPValues available in the VPlan.
3773-
ArrayRef<VPValue *> getLiveIns() const { return VPLiveInsToFree; }
3773+
ArrayRef<VPValue *> getLiveIns() const { return VPLiveIns; }
37743774

37753775
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
37763776
/// Print the live-ins of this VPlan to \p O.

0 commit comments

Comments
 (0)