Skip to content

Commit 11b1bd5

Browse files
authored
[DA] Fix typo: Constan -> Constant (NFC) (#170636)
1 parent 0ba73fb commit 11b1bd5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Analysis/DependenceAnalysis.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,7 +2495,7 @@ bool DependenceInfo::testMIV(const SCEV *Src, const SCEV *Dst,
24952495
/// returns std::nullopt. For example, given (10 * X * Y)<nsw>, it returns 10.
24962496
/// Notably, if it doesn't have nsw, the multiplication may overflow, and if
24972497
/// so, it may not a multiple of 10.
2498-
static std::optional<APInt> getConstanCoefficient(const SCEV *Expr) {
2498+
static std::optional<APInt> getConstantCoefficient(const SCEV *Expr) {
24992499
if (const auto *Constant = dyn_cast<SCEVConstant>(Expr))
25002500
return Constant->getAPInt();
25012501
if (const auto *Product = dyn_cast<SCEVMulExpr>(Expr))
@@ -2527,7 +2527,7 @@ bool DependenceInfo::accumulateCoefficientsGCD(const SCEV *Expr,
25272527
if (AddRec->getLoop() == CurLoop) {
25282528
CurLoopCoeff = Step;
25292529
} else {
2530-
std::optional<APInt> ConstCoeff = getConstanCoefficient(Step);
2530+
std::optional<APInt> ConstCoeff = getConstantCoefficient(Step);
25312531

25322532
// If the coefficient is the product of a constant and other stuff, we can
25332533
// use the constant in the GCD computation.
@@ -2580,7 +2580,7 @@ bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst,
25802580
const SCEV *Coeff = AddRec->getStepRecurrence(*SE);
25812581
// If the coefficient is the product of a constant and other stuff,
25822582
// we can use the constant in the GCD computation.
2583-
std::optional<APInt> ConstCoeff = getConstanCoefficient(Coeff);
2583+
std::optional<APInt> ConstCoeff = getConstantCoefficient(Coeff);
25842584
if (!ConstCoeff)
25852585
return false;
25862586
RunningGCD = APIntOps::GreatestCommonDivisor(RunningGCD, ConstCoeff->abs());
@@ -2598,7 +2598,7 @@ bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst,
25982598
const SCEV *Coeff = AddRec->getStepRecurrence(*SE);
25992599
// If the coefficient is the product of a constant and other stuff,
26002600
// we can use the constant in the GCD computation.
2601-
std::optional<APInt> ConstCoeff = getConstanCoefficient(Coeff);
2601+
std::optional<APInt> ConstCoeff = getConstantCoefficient(Coeff);
26022602
if (!ConstCoeff)
26032603
return false;
26042604
RunningGCD = APIntOps::GreatestCommonDivisor(RunningGCD, ConstCoeff->abs());
@@ -2656,7 +2656,7 @@ bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst,
26562656
Delta = SE->getMinusSCEV(SrcCoeff, DstCoeff);
26572657
// If the coefficient is the product of a constant and other stuff,
26582658
// we can use the constant in the GCD computation.
2659-
std::optional<APInt> ConstCoeff = getConstanCoefficient(Delta);
2659+
std::optional<APInt> ConstCoeff = getConstantCoefficient(Delta);
26602660
if (!ConstCoeff)
26612661
// The difference of the two coefficients might not be a product
26622662
// or constant, in which case we give up on this direction.

0 commit comments

Comments
 (0)