Skip to content

Commit 9c8ac1d

Browse files
committed
Rename to getVFScaleFactor
1 parent 9a9164f commit 9c8ac1d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5026,7 +5026,7 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
50265026
VF = VF.divideCoefficientBy(ReductionR->getVFScaleFactor());
50275027
else if (auto *PartialReductionR =
50285028
dyn_cast<VPPartialReductionRecipe>(R))
5029-
VF = VF.divideCoefficientBy(PartialReductionR->getScaleFactor());
5029+
VF = VF.divideCoefficientBy(PartialReductionR->getVFScaleFactor());
50305030
if (VF != VFs[J])
50315031
LLVM_DEBUG(dbgs() << "LV(REG): Scaled down VF from " << VFs[J]
50325032
<< " to " << VF << " for ";

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,19 +2065,19 @@ class VPReductionPHIRecipe : public VPHeaderPHIRecipe,
20652065
/// scalar value.
20662066
class VPPartialReductionRecipe : public VPSingleDefRecipe {
20672067
unsigned Opcode;
2068-
unsigned ScaleFactor;
2068+
unsigned VFScaleFactor;
20692069

20702070
public:
20712071
VPPartialReductionRecipe(Instruction *ReductionInst, VPValue *Op0,
2072-
VPValue *Op1, unsigned ScaleFactor)
2072+
VPValue *Op1, unsigned VFScaleFactor)
20732073
: VPPartialReductionRecipe(ReductionInst->getOpcode(), Op0, Op1,
2074-
ScaleFactor, ReductionInst) {}
2074+
VFScaleFactor, ReductionInst) {}
20752075
VPPartialReductionRecipe(unsigned Opcode, VPValue *Op0, VPValue *Op1,
2076-
unsigned ScaleFactor,
2076+
unsigned VFScaleFactor,
20772077
Instruction *ReductionInst = nullptr)
20782078
: VPSingleDefRecipe(VPDef::VPPartialReductionSC,
20792079
ArrayRef<VPValue *>({Op0, Op1}), ReductionInst),
2080-
Opcode(Opcode), ScaleFactor(ScaleFactor) {
2080+
Opcode(Opcode), VFScaleFactor(VFScaleFactor) {
20812081
[[maybe_unused]] auto *AccumulatorRecipe =
20822082
getOperand(1)->getDefiningRecipe();
20832083
assert((isa<VPReductionPHIRecipe>(AccumulatorRecipe) ||
@@ -2088,7 +2088,7 @@ class VPPartialReductionRecipe : public VPSingleDefRecipe {
20882088

20892089
VPPartialReductionRecipe *clone() override {
20902090
return new VPPartialReductionRecipe(Opcode, getOperand(0), getOperand(1),
2091-
ScaleFactor, getUnderlyingInstr());
2091+
VFScaleFactor, getUnderlyingInstr());
20922092
}
20932093

20942094
VP_CLASSOF_IMPL(VPDef::VPPartialReductionSC)
@@ -2103,7 +2103,7 @@ class VPPartialReductionRecipe : public VPSingleDefRecipe {
21032103
/// Get the binary op's opcode.
21042104
unsigned getOpcode() const { return Opcode; }
21052105

2106-
unsigned getScaleFactor() const { return ScaleFactor; }
2106+
unsigned getVFScaleFactor() const { return VFScaleFactor; }
21072107

21082108
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
21092109
/// Print the recipe.

0 commit comments

Comments
 (0)