Skip to content

Commit 5421b68

Browse files
committed
LV: change name of lambda; address review
1 parent 9ec07e7 commit 5421b68

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4883,8 +4883,9 @@ bool LoopVectorizationPlanner::isMoreProfitable(
48834883
if (!MaxTripCount)
48844884
return CmpFn(CostA * EstimatedWidthB, CostB * EstimatedWidthA);
48854885

4886-
auto GetCost = [MaxTripCount, this](unsigned VF, InstructionCost VectorCost,
4887-
InstructionCost ScalarCost) {
4886+
auto GetCostForTC = [MaxTripCount, this](unsigned VF,
4887+
InstructionCost VectorCost,
4888+
InstructionCost ScalarCost) {
48884889
// If the trip count is a known (possibly small) constant, the trip count
48894890
// will be rounded up to an integer number of iterations under
48904891
// FoldTailByMasking. The total cost in that case will be
@@ -4898,8 +4899,8 @@ bool LoopVectorizationPlanner::isMoreProfitable(
48984899
return VectorCost * (MaxTripCount / VF) + ScalarCost * (MaxTripCount % VF);
48994900
};
49004901

4901-
auto RTCostA = GetCost(EstimatedWidthA, CostA, A.ScalarCost);
4902-
auto RTCostB = GetCost(EstimatedWidthB, CostB, B.ScalarCost);
4902+
auto RTCostA = GetCostForTC(EstimatedWidthA, CostA, A.ScalarCost);
4903+
auto RTCostB = GetCostForTC(EstimatedWidthB, CostB, B.ScalarCost);
49034904
return CmpFn(RTCostA, RTCostB);
49044905
}
49054906

0 commit comments

Comments
 (0)