Skip to content

Commit 96cae81

Browse files
committed
[ScalarEvolution][NFC] Typo fix
Fix typo in ScalarEvolution public method. Differential Revision: https://reviews.llvm.org/D156621
1 parent 6891812 commit 96cae81

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

llvm/include/llvm/Analysis/ScalarEvolution.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ class ScalarEvolution {
525525
/// loop { v2 = load @global2; }
526526
/// }
527527
/// No SCEV with operand V1, and v2 can exist in this program.
528-
bool instructionCouldExistWitthOperands(const SCEV *A, const SCEV *B);
528+
bool instructionCouldExistWithOperands(const SCEV *A, const SCEV *B);
529529

530530
/// Return true if the SCEV is a scAddRecExpr or it contains
531531
/// scAddRecExpr. The result will be cached in HasRecMap.
@@ -855,7 +855,7 @@ class ScalarEvolution {
855855
const BasicBlock *ExitingBlock);
856856

857857
/// The terms "backedge taken count" and "exit count" are used
858-
/// interchangeably to refer to the number of times the backedge of a loop
858+
/// interchangeably to refer to the number of times the backedge of a loop
859859
/// has executed before the loop is exited.
860860
enum ExitCountKind {
861861
/// An expression exactly describing the number of times the backedge has
@@ -868,7 +868,7 @@ class ScalarEvolution {
868868
};
869869

870870
/// Return the number of times the backedge executes before the given exit
871-
/// would be taken; if not exactly computable, return SCEVCouldNotCompute.
871+
/// would be taken; if not exactly computable, return SCEVCouldNotCompute.
872872
/// For a single exit loop, this value is equivelent to the result of
873873
/// getBackedgeTakenCount. The loop is guaranteed to exit (via *some* exit)
874874
/// before the backedge is executed (ExitCount + 1) times. Note that there

llvm/lib/Analysis/ScalarEvolution.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,9 +1715,9 @@ const SCEV *ScalarEvolution::getZeroExtendExprImpl(const SCEV *Op, Type *Ty,
17151715
Step = getZeroExtendExpr(Step, Ty, Depth + 1);
17161716
return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags());
17171717
}
1718-
1718+
17191719
// For a negative step, we can extend the operands iff doing so only
1720-
// traverses values in the range zext([0,UINT_MAX]).
1720+
// traverses values in the range zext([0,UINT_MAX]).
17211721
if (isKnownNegative(Step)) {
17221722
const SCEV *N = getConstant(APInt::getMaxValue(BitWidth) -
17231723
getSignedRangeMin(Step));
@@ -4403,8 +4403,8 @@ Type *ScalarEvolution::getWiderType(Type *T1, Type *T2) const {
44034403
return getTypeSizeInBits(T1) >= getTypeSizeInBits(T2) ? T1 : T2;
44044404
}
44054405

4406-
bool ScalarEvolution::instructionCouldExistWitthOperands(const SCEV *A,
4407-
const SCEV *B) {
4406+
bool ScalarEvolution::instructionCouldExistWithOperands(const SCEV *A,
4407+
const SCEV *B) {
44084408
/// For a valid use point to exist, the defining scope of one operand
44094409
/// must dominate the other.
44104410
bool PreciseA, PreciseB;
@@ -4417,7 +4417,6 @@ bool ScalarEvolution::instructionCouldExistWitthOperands(const SCEV *A,
44174417
DT.dominates(ScopeB, ScopeA);
44184418
}
44194419

4420-
44214420
const SCEV *ScalarEvolution::getCouldNotCompute() {
44224421
return CouldNotCompute.get();
44234422
}
@@ -9007,7 +9006,7 @@ ScalarEvolution::ExitLimit ScalarEvolution::computeExitLimitFromICmp(
90079006
InnerLHS = ZExt->getOperand();
90089007
if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(InnerLHS)) {
90099008
auto *StrideC = dyn_cast<SCEVConstant>(AR->getStepRecurrence(*this));
9010-
if (!AR->hasNoSelfWrap() && AR->getLoop() == L && AR->isAffine() &&
9009+
if (!AR->hasNoSelfWrap() && AR->getLoop() == L && AR->isAffine() &&
90119010
StrideC && StrideC->getAPInt().isPowerOf2()) {
90129011
auto Flags = AR->getNoWrapFlags();
90139012
Flags = setFlags(Flags, SCEV::FlagNW);
@@ -12501,7 +12500,7 @@ bool ScalarEvolution::canIVOverflowOnLT(const SCEV *RHS, const SCEV *Stride,
1250112500

1250212501
bool ScalarEvolution::canIVOverflowOnGT(const SCEV *RHS, const SCEV *Stride,
1250312502
bool IsSigned) {
12504-
12503+
1250512504
unsigned BitWidth = getTypeSizeInBits(RHS->getType());
1250612505
const SCEV *One = getOne(Stride->getType());
1250712506

llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static bool canComputePointerDiff(ScalarEvolution &SE,
3030
SE.getEffectiveSCEVType(B->getType()))
3131
return false;
3232

33-
return SE.instructionCouldExistWitthOperands(A, B);
33+
return SE.instructionCouldExistWithOperands(A, B);
3434
}
3535

3636
AliasResult SCEVAAResult::alias(const MemoryLocation &LocA,

0 commit comments

Comments
 (0)