forked from OSchip/llvm-project
[SCEV] Rename isKnownPredicateWithRanges; NFC
Make it obvious that it uses constant ranges, and use `Via` instead of `With`, like other similar functions in SCEV. llvm-svn: 259400
This commit is contained in:
parent
52570ea2a2
commit
401e631c4b
|
@ -733,8 +733,8 @@ namespace llvm {
|
|||
/// Test if the given expression is known to satisfy the condition described
|
||||
/// by Pred and the known constant ranges of LHS and RHS.
|
||||
///
|
||||
bool isKnownPredicateWithRanges(ICmpInst::Predicate Pred,
|
||||
const SCEV *LHS, const SCEV *RHS);
|
||||
bool isKnownPredicateViaConstantRanges(ICmpInst::Predicate Pred,
|
||||
const SCEV *LHS, const SCEV *RHS);
|
||||
|
||||
/// Try to prove the condition described by "LHS Pred RHS" by ruling out
|
||||
/// integer overflow.
|
||||
|
|
|
@ -7131,7 +7131,7 @@ bool ScalarEvolution::isKnownPredicate(ICmpInst::Predicate Pred,
|
|||
return true;
|
||||
|
||||
// Otherwise see what can be done with known constant ranges.
|
||||
return isKnownPredicateWithRanges(Pred, LHS, RHS);
|
||||
return isKnownPredicateViaConstantRanges(Pred, LHS, RHS);
|
||||
}
|
||||
|
||||
bool ScalarEvolution::isMonotonicPredicate(const SCEVAddRecExpr *LHS,
|
||||
|
@ -7261,9 +7261,8 @@ bool ScalarEvolution::isLoopInvariantPredicate(
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ScalarEvolution::isKnownPredicateWithRanges(ICmpInst::Predicate Pred,
|
||||
const SCEV *LHS, const SCEV *RHS) {
|
||||
bool ScalarEvolution::isKnownPredicateViaConstantRanges(
|
||||
ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS) {
|
||||
if (HasSameValue(LHS, RHS))
|
||||
return ICmpInst::isTrueWhenEqual(Pred);
|
||||
|
||||
|
@ -7424,7 +7423,8 @@ ScalarEvolution::isLoopBackedgeGuardedByCond(const Loop *L,
|
|||
// (interprocedural conditions notwithstanding).
|
||||
if (!L) return true;
|
||||
|
||||
if (isKnownPredicateWithRanges(Pred, LHS, RHS)) return true;
|
||||
if (isKnownPredicateViaConstantRanges(Pred, LHS, RHS))
|
||||
return true;
|
||||
|
||||
BasicBlock *Latch = L->getLoopLatch();
|
||||
if (!Latch)
|
||||
|
@ -7526,7 +7526,8 @@ ScalarEvolution::isLoopEntryGuardedByCond(const Loop *L,
|
|||
// (interprocedural conditions notwithstanding).
|
||||
if (!L) return false;
|
||||
|
||||
if (isKnownPredicateWithRanges(Pred, LHS, RHS)) return true;
|
||||
if (isKnownPredicateViaConstantRanges(Pred, LHS, RHS))
|
||||
return true;
|
||||
|
||||
// Starting at the loop predecessor, climb up the predecessor chain, as long
|
||||
// as there are predecessors that can be found that have unique successors
|
||||
|
@ -8044,7 +8045,7 @@ ScalarEvolution::isImpliedCondOperandsHelper(ICmpInst::Predicate Pred,
|
|||
const SCEV *FoundRHS) {
|
||||
auto IsKnownPredicateFull =
|
||||
[this](ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS) {
|
||||
return isKnownPredicateWithRanges(Pred, LHS, RHS) ||
|
||||
return isKnownPredicateViaConstantRanges(Pred, LHS, RHS) ||
|
||||
IsKnownPredicateViaMinOrMax(*this, Pred, LHS, RHS) ||
|
||||
IsKnownPredicateViaAddRecStart(*this, Pred, LHS, RHS) ||
|
||||
isKnownPredicateViaNoOverflow(Pred, LHS, RHS);
|
||||
|
|
Loading…
Reference in New Issue