[llvm] ecc8547 - [VPlan] Drop dead CostCtx/Range arg sfrom getScaledReductions (NFC) (#206285)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 27 13:34:19 PDT 2026
Author: Florian Hahn
Date: 2026-06-27T20:34:15Z
New Revision: ecc85477eb14378e2ffe700843cf8ab0e2b02047
URL: https://github.com/llvm/llvm-project/commit/ecc85477eb14378e2ffe700843cf8ab0e2b02047
DIFF: https://github.com/llvm/llvm-project/commit/ecc85477eb14378e2ffe700843cf8ab0e2b02047.diff
LOG: [VPlan] Drop dead CostCtx/Range arg sfrom getScaledReductions (NFC) (#206285)
Neither parameter is referenced; the cost-checking they described moved
to createPartialReductions. Also remove the stale comment.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index cfe21de1c7595..7604e09aa8210 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -6951,8 +6951,7 @@ matchExtendedReductionOperand(VPWidenRecipe *UpdateR, VPValue *Op) {
/// per-iteration input VF and narrower PHI VF. If successful, returns the chain
/// of operations in the reduction.
static std::optional<SmallVector<VPPartialReductionChain>>
-getScaledReductions(VPReductionPHIRecipe *RedPhiR, VPCostContext &CostCtx,
- VFRange &Range) {
+getScaledReductions(VPReductionPHIRecipe *RedPhiR) {
// Get the backedge value from the reduction PHI and find the
// ComputeReductionResult that uses it (directly or through a select for
// predicated reductions).
@@ -6993,9 +6992,6 @@ getScaledReductions(VPReductionPHIRecipe *RedPhiR, VPCostContext &CostCtx,
if (!PHISize.hasKnownScalarFactor(ExtSrcSize))
return std::nullopt;
- // Check if a partial reduction chain is supported by the target (i.e. does
- // not have an invalid cost) for the given VF range. Clamps the range and
- // returns true if feasible for any VF.
VPPartialReductionChain Link(
{UpdateR, *ExtendedOp, RK,
PrevValue == UpdateR->getOperand(0) ? 0U : 1U,
@@ -7025,7 +7021,7 @@ void VPlanTransforms::createPartialReductions(VPlan &Plan,
if (!RedPhiR)
continue;
- if (auto Chains = getScaledReductions(RedPhiR, CostCtx, Range))
+ if (auto Chains = getScaledReductions(RedPhiR))
ChainsByPhi.try_emplace(RedPhiR, std::move(*Chains));
}
More information about the llvm-commits
mailing list