Skip to content

Commit 505fcb4

Browse files
committed
Rename to getVFScaleFactor
1 parent 6193c2c commit 505fcb4

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
@@ -5033,7 +5033,7 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
50335033
VF = VF.divideCoefficientBy(ReductionR->getVFScaleFactor());
50345034
else if (auto *PartialReductionR =
50355035
dyn_cast<VPPartialReductionRecipe>(R))
5036-
VF = VF.divideCoefficientBy(PartialReductionR->getScaleFactor());
5036+
VF = VF.divideCoefficientBy(PartialReductionR->getVFScaleFactor());
50375037
if (VF != VFs[J])
50385038
LLVM_DEBUG(dbgs() << "LV(REG): Scaled down VF from " << VFs[J]
50395039
<< " to " << VF << " for ";

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,19 +2033,19 @@ class VPReductionPHIRecipe : public VPHeaderPHIRecipe,
20332033
/// scalar value.
20342034
class VPPartialReductionRecipe : public VPSingleDefRecipe {
20352035
unsigned Opcode;
2036-
unsigned ScaleFactor;
2036+
unsigned VFScaleFactor;
20372037

20382038
public:
20392039
VPPartialReductionRecipe(Instruction *ReductionInst, VPValue *Op0,
2040-
VPValue *Op1, unsigned ScaleFactor)
2040+
VPValue *Op1, unsigned VFScaleFactor)
20412041
: VPPartialReductionRecipe(ReductionInst->getOpcode(), Op0, Op1,
2042-
ScaleFactor, ReductionInst) {}
2042+
VFScaleFactor, ReductionInst) {}
20432043
VPPartialReductionRecipe(unsigned Opcode, VPValue *Op0, VPValue *Op1,
2044-
unsigned ScaleFactor,
2044+
unsigned VFScaleFactor,
20452045
Instruction *ReductionInst = nullptr)
20462046
: VPSingleDefRecipe(VPDef::VPPartialReductionSC,
20472047
ArrayRef<VPValue *>({Op0, Op1}), ReductionInst),
2048-
Opcode(Opcode), ScaleFactor(ScaleFactor) {
2048+
Opcode(Opcode), VFScaleFactor(VFScaleFactor) {
20492049
[[maybe_unused]] auto *AccumulatorRecipe =
20502050
getOperand(1)->getDefiningRecipe();
20512051
assert((isa<VPReductionPHIRecipe>(AccumulatorRecipe) ||
@@ -2056,7 +2056,7 @@ class VPPartialReductionRecipe : public VPSingleDefRecipe {
20562056

20572057
VPPartialReductionRecipe *clone() override {
20582058
return new VPPartialReductionRecipe(Opcode, getOperand(0), getOperand(1),
2059-
ScaleFactor, getUnderlyingInstr());
2059+
VFScaleFactor, getUnderlyingInstr());
20602060
}
20612061

20622062
VP_CLASSOF_IMPL(VPDef::VPPartialReductionSC)
@@ -2071,7 +2071,7 @@ class VPPartialReductionRecipe : public VPSingleDefRecipe {
20712071
/// Get the binary op's opcode.
20722072
unsigned getOpcode() const { return Opcode; }
20732073

2074-
unsigned getScaleFactor() const { return ScaleFactor; }
2074+
unsigned getVFScaleFactor() const { return VFScaleFactor; }
20752075

20762076
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
20772077
/// Print the recipe.

0 commit comments

Comments
 (0)