diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -525,7 +525,7 @@ /// loop { v2 = load @global2; } /// } /// No SCEV with operand V1, and v2 can exist in this program. - bool instructionCouldExistWitthOperands(const SCEV *A, const SCEV *B); + bool instructionCouldExistWithOperands(const SCEV *A, const SCEV *B); /// Return true if the SCEV is a scAddRecExpr or it contains /// scAddRecExpr. The result will be cached in HasRecMap. @@ -855,7 +855,7 @@ const BasicBlock *ExitingBlock); /// The terms "backedge taken count" and "exit count" are used - /// interchangeably to refer to the number of times the backedge of a loop + /// interchangeably to refer to the number of times the backedge of a loop /// has executed before the loop is exited. enum ExitCountKind { /// An expression exactly describing the number of times the backedge has @@ -868,7 +868,7 @@ }; /// Return the number of times the backedge executes before the given exit - /// would be taken; if not exactly computable, return SCEVCouldNotCompute. + /// would be taken; if not exactly computable, return SCEVCouldNotCompute. /// For a single exit loop, this value is equivelent to the result of /// getBackedgeTakenCount. The loop is guaranteed to exit (via *some* exit) /// before the backedge is executed (ExitCount + 1) times. Note that there diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -1715,9 +1715,9 @@ Step = getZeroExtendExpr(Step, Ty, Depth + 1); return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); } - + // For a negative step, we can extend the operands iff doing so only - // traverses values in the range zext([0,UINT_MAX]). + // traverses values in the range zext([0,UINT_MAX]). if (isKnownNegative(Step)) { const SCEV *N = getConstant(APInt::getMaxValue(BitWidth) - getSignedRangeMin(Step)); @@ -4403,8 +4403,8 @@ return getTypeSizeInBits(T1) >= getTypeSizeInBits(T2) ? T1 : T2; } -bool ScalarEvolution::instructionCouldExistWitthOperands(const SCEV *A, - const SCEV *B) { +bool ScalarEvolution::instructionCouldExistWithOperands(const SCEV *A, + const SCEV *B) { /// For a valid use point to exist, the defining scope of one operand /// must dominate the other. bool PreciseA, PreciseB; @@ -4417,7 +4417,6 @@ DT.dominates(ScopeB, ScopeA); } - const SCEV *ScalarEvolution::getCouldNotCompute() { return CouldNotCompute.get(); } @@ -9007,7 +9006,7 @@ InnerLHS = ZExt->getOperand(); if (const SCEVAddRecExpr *AR = dyn_cast(InnerLHS)) { auto *StrideC = dyn_cast(AR->getStepRecurrence(*this)); - if (!AR->hasNoSelfWrap() && AR->getLoop() == L && AR->isAffine() && + if (!AR->hasNoSelfWrap() && AR->getLoop() == L && AR->isAffine() && StrideC && StrideC->getAPInt().isPowerOf2()) { auto Flags = AR->getNoWrapFlags(); Flags = setFlags(Flags, SCEV::FlagNW); @@ -12501,7 +12500,7 @@ bool ScalarEvolution::canIVOverflowOnGT(const SCEV *RHS, const SCEV *Stride, bool IsSigned) { - + unsigned BitWidth = getTypeSizeInBits(RHS->getType()); const SCEV *One = getOne(Stride->getType()); diff --git a/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp b/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp --- a/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp +++ b/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp @@ -30,7 +30,7 @@ SE.getEffectiveSCEVType(B->getType())) return false; - return SE.instructionCouldExistWitthOperands(A, B); + return SE.instructionCouldExistWithOperands(A, B); } AliasResult SCEVAAResult::alias(const MemoryLocation &LocA,