From 79fbb54153ca3930ebfafe2851928f857607c879 Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Thu, 4 Dec 2025 10:14:54 +0000 Subject: [PATCH] [DA] Fix typo: Constan -> Constant (NFC) --- llvm/lib/Analysis/DependenceAnalysis.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp index 7e908a3b73868..e6c535606812d 100644 --- a/llvm/lib/Analysis/DependenceAnalysis.cpp +++ b/llvm/lib/Analysis/DependenceAnalysis.cpp @@ -2470,7 +2470,7 @@ bool DependenceInfo::testMIV(const SCEV *Src, const SCEV *Dst, /// returns std::nullopt. For example, given (10 * X * Y), it returns 10. /// Notably, if it doesn't have nsw, the multiplication may overflow, and if /// so, it may not a multiple of 10. -static std::optional getConstanCoefficient(const SCEV *Expr) { +static std::optional getConstantCoefficient(const SCEV *Expr) { if (const auto *Constant = dyn_cast(Expr)) return Constant->getAPInt(); if (const auto *Product = dyn_cast(Expr)) @@ -2502,7 +2502,7 @@ bool DependenceInfo::accumulateCoefficientsGCD(const SCEV *Expr, if (AddRec->getLoop() == CurLoop) { CurLoopCoeff = Step; } else { - std::optional ConstCoeff = getConstanCoefficient(Step); + std::optional ConstCoeff = getConstantCoefficient(Step); // If the coefficient is the product of a constant and other stuff, we can // use the constant in the GCD computation. @@ -2555,7 +2555,7 @@ bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst, const SCEV *Coeff = AddRec->getStepRecurrence(*SE); // If the coefficient is the product of a constant and other stuff, // we can use the constant in the GCD computation. - std::optional ConstCoeff = getConstanCoefficient(Coeff); + std::optional ConstCoeff = getConstantCoefficient(Coeff); if (!ConstCoeff) return false; RunningGCD = APIntOps::GreatestCommonDivisor(RunningGCD, ConstCoeff->abs()); @@ -2573,7 +2573,7 @@ bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst, const SCEV *Coeff = AddRec->getStepRecurrence(*SE); // If the coefficient is the product of a constant and other stuff, // we can use the constant in the GCD computation. - std::optional ConstCoeff = getConstanCoefficient(Coeff); + std::optional ConstCoeff = getConstantCoefficient(Coeff); if (!ConstCoeff) return false; RunningGCD = APIntOps::GreatestCommonDivisor(RunningGCD, ConstCoeff->abs()); @@ -2631,7 +2631,7 @@ bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst, Delta = SE->getMinusSCEV(SrcCoeff, DstCoeff); // If the coefficient is the product of a constant and other stuff, // we can use the constant in the GCD computation. - std::optional ConstCoeff = getConstanCoefficient(Delta); + std::optional ConstCoeff = getConstantCoefficient(Delta); if (!ConstCoeff) // The difference of the two coefficients might not be a product // or constant, in which case we give up on this direction.