Skip to content

Commit cb23083

Browse files
fhahnSamTebbs33
authored andcommitted
!fixup address latest comments, thanks!
1 parent fdadc19 commit cb23083

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4908,8 +4908,8 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49084908
// recipe that is the key.
49094909
using IntervalMap = SmallDenseMap<VPRecipeBase *, unsigned, 16>;
49104910

4911-
// Maps recipe to its index.
4912-
SmallVector<VPRecipeBase *, 64> IdxToRecipe;
4911+
// Maps indices to recipes.
4912+
SmallVector<VPRecipeBase *, 64> Idx2Recipe;
49134913
// Marks the end of each interval.
49144914
IntervalMap EndPoint;
49154915
// Saves the list of recipe indices that are used in the loop.
@@ -4926,7 +4926,7 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49264926
if (!VPBB->getParent())
49274927
break;
49284928
for (VPRecipeBase &R : *VPBB) {
4929-
IdxToRecipe.push_back(&R);
4929+
Idx2Recipe.push_back(&R);
49304930

49314931
// Save the end location of each USE.
49324932
for (VPValue *U : R.operands()) {
@@ -4947,7 +4947,7 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49474947
}
49484948

49494949
// Overwrite previous end points.
4950-
EndPoint[DefR] = IdxToRecipe.size();
4950+
EndPoint[DefR] = Idx2Recipe.size();
49514951
Ends.insert(DefR);
49524952
}
49534953
}
@@ -4956,7 +4956,7 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49564956
// exiting block, where their increment will get materialized eventually.
49574957
for (auto &R : Plan.getVectorLoopRegion()->getEntryBasicBlock()->phis()) {
49584958
if (isa<VPWidenIntOrFpInductionRecipe>(&R)) {
4959-
EndPoint[&R] = IdxToRecipe.size();
4959+
EndPoint[&R] = Idx2Recipe.size();
49604960
Ends.insert(&R);
49614961
}
49624962
}
@@ -4988,8 +4988,8 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49884988
return TTICapture.getRegUsageForType(VectorType::get(Ty, VF));
49894989
};
49904990

4991-
for (unsigned int Idx = 0, Sz = IdxToRecipe.size(); Idx < Sz; ++Idx) {
4992-
VPRecipeBase *R = IdxToRecipe[Idx];
4991+
for (unsigned int Idx = 0, Sz = Idx2Recipe.size(); Idx < Sz; ++Idx) {
4992+
VPRecipeBase *R = Idx2Recipe[Idx];
49934993

49944994
// Remove all of the recipes that end at this location.
49954995
RecipeList &List = TransposeEnds[Idx];
@@ -5405,7 +5405,7 @@ LoopVectorizationCostModel::calculateRegisterUsage(ArrayRef<ElementCount> VFs) {
54055405
// We also search for instructions that are defined outside the loop, but are
54065406
// used inside the loop. We need this number separately from the max-interval
54075407
// usage number because when we unroll, loop-invariant values do not take
5408-
// more register.
5408+
// more registers.
54095409
LoopBlocksDFS DFS(TheLoop);
54105410
DFS.perform(LI);
54115411

0 commit comments

Comments
 (0)