Skip to content

Commit bc57c23

Browse files
fhahnSamTebbs33
authored andcommitted
!fixup address latest comments, thanks!
1 parent f2ad5d9 commit bc57c23

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
@@ -4911,8 +4911,8 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49114911
// recipe that is the key.
49124912
using IntervalMap = SmallDenseMap<VPRecipeBase *, unsigned, 16>;
49134913

4914-
// Maps recipe to its index.
4915-
SmallVector<VPRecipeBase *, 64> IdxToRecipe;
4914+
// Maps indices to recipes.
4915+
SmallVector<VPRecipeBase *, 64> Idx2Recipe;
49164916
// Marks the end of each interval.
49174917
IntervalMap EndPoint;
49184918
// Saves the list of recipe indices that are used in the loop.
@@ -4929,7 +4929,7 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49294929
if (!VPBB->getParent())
49304930
break;
49314931
for (VPRecipeBase &R : *VPBB) {
4932-
IdxToRecipe.push_back(&R);
4932+
Idx2Recipe.push_back(&R);
49334933

49344934
// Save the end location of each USE.
49354935
for (VPValue *U : R.operands()) {
@@ -4950,7 +4950,7 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49504950
}
49514951

49524952
// Overwrite previous end points.
4953-
EndPoint[DefR] = IdxToRecipe.size();
4953+
EndPoint[DefR] = Idx2Recipe.size();
49544954
Ends.insert(DefR);
49554955
}
49564956
}
@@ -4959,7 +4959,7 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49594959
// exiting block, where their increment will get materialized eventually.
49604960
for (auto &R : Plan.getVectorLoopRegion()->getEntryBasicBlock()->phis()) {
49614961
if (isa<VPWidenIntOrFpInductionRecipe>(&R)) {
4962-
EndPoint[&R] = IdxToRecipe.size();
4962+
EndPoint[&R] = Idx2Recipe.size();
49634963
Ends.insert(&R);
49644964
}
49654965
}
@@ -4991,8 +4991,8 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
49914991
return TTICapture.getRegUsageForType(VectorType::get(Ty, VF));
49924992
};
49934993

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

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

0 commit comments

Comments
 (0)