1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

[NFC] Rename isKnownViaSimpleReasoning to isKnownViaNonRecursiveReasoning

llvm-svn: 325216
This commit is contained in:
Max Kazantsev 2018-02-15 07:47:17 +00:00
parent f098039f09
commit 2fec5b71da
2 changed files with 17 additions and 17 deletions

View File

@ -1591,8 +1591,8 @@ private:
/// Test whether the condition described by Pred, LHS, and RHS is true.
/// Use only simple non-recursive types of checks, such as range analysis etc.
bool isKnownViaSimpleReasoning(ICmpInst::Predicate Pred,
const SCEV *LHS, const SCEV *RHS);
bool isKnownViaNonRecursiveReasoning(ICmpInst::Predicate Pred,
const SCEV *LHS, const SCEV *RHS);
/// Test whether the condition described by Pred, LHS, and RHS is true
/// whenever the condition described by Pred, FoundLHS, and FoundRHS is

View File

@ -8694,7 +8694,7 @@ bool ScalarEvolution::isKnownPredicate(ICmpInst::Predicate Pred,
return true;
// Otherwise see what can be done with some simple reasoning.
return isKnownViaSimpleReasoning(Pred, LHS, RHS);
return isKnownViaNonRecursiveReasoning(Pred, LHS, RHS);
}
bool ScalarEvolution::isMonotonicPredicate(const SCEVAddRecExpr *LHS,
@ -8961,7 +8961,7 @@ ScalarEvolution::isLoopBackedgeGuardedByCond(const Loop *L,
// (interprocedural conditions notwithstanding).
if (!L) return true;
if (isKnownViaSimpleReasoning(Pred, LHS, RHS))
if (isKnownViaNonRecursiveReasoning(Pred, LHS, RHS))
return true;
BasicBlock *Latch = L->getLoopLatch();
@ -9072,7 +9072,7 @@ ScalarEvolution::isLoopEntryGuardedByCond(const Loop *L,
assert(isAvailableAtLoopEntry(RHS, L) &&
"RHS is not available at Loop Entry");
if (isKnownViaSimpleReasoning(Pred, LHS, RHS))
if (isKnownViaNonRecursiveReasoning(Pred, LHS, RHS))
return true;
// If we cannot prove strict comparison (e.g. a > b), maybe we can prove
@ -9087,9 +9087,9 @@ ScalarEvolution::isLoopEntryGuardedByCond(const Loop *L,
if (ProvingStrictComparison) {
ProvedNonStrictComparison =
isKnownViaSimpleReasoning(NonStrictPredicate, LHS, RHS);
isKnownViaNonRecursiveReasoning(NonStrictPredicate, LHS, RHS);
ProvedNonEquality =
isKnownViaSimpleReasoning(ICmpInst::ICMP_NE, LHS, RHS);
isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_NE, LHS, RHS);
if (ProvedNonStrictComparison && ProvedNonEquality)
return true;
}
@ -9644,7 +9644,7 @@ bool ScalarEvolution::isImpliedViaOperations(ICmpInst::Predicate Pred,
// Is the SGT predicate can be proved trivially or using the found context.
auto IsSGTViaContext = [&](const SCEV *S1, const SCEV *S2) {
return isKnownViaSimpleReasoning(ICmpInst::ICMP_SGT, S1, S2) ||
return isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_SGT, S1, S2) ||
isImpliedViaOperations(ICmpInst::ICMP_SGT, S1, S2, OrigFoundLHS,
FoundRHS, Depth + 1);
};
@ -9749,7 +9749,7 @@ bool ScalarEvolution::isImpliedViaOperations(ICmpInst::Predicate Pred,
}
bool
ScalarEvolution::isKnownViaSimpleReasoning(ICmpInst::Predicate Pred,
ScalarEvolution::isKnownViaNonRecursiveReasoning(ICmpInst::Predicate Pred,
const SCEV *LHS, const SCEV *RHS) {
return isKnownPredicateViaConstantRanges(Pred, LHS, RHS) ||
IsKnownPredicateViaMinOrMax(*this, Pred, LHS, RHS) ||
@ -9771,26 +9771,26 @@ ScalarEvolution::isImpliedCondOperandsHelper(ICmpInst::Predicate Pred,
break;
case ICmpInst::ICMP_SLT:
case ICmpInst::ICMP_SLE:
if (isKnownViaSimpleReasoning(ICmpInst::ICMP_SLE, LHS, FoundLHS) &&
isKnownViaSimpleReasoning(ICmpInst::ICMP_SGE, RHS, FoundRHS))
if (isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_SLE, LHS, FoundLHS) &&
isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_SGE, RHS, FoundRHS))
return true;
break;
case ICmpInst::ICMP_SGT:
case ICmpInst::ICMP_SGE:
if (isKnownViaSimpleReasoning(ICmpInst::ICMP_SGE, LHS, FoundLHS) &&
isKnownViaSimpleReasoning(ICmpInst::ICMP_SLE, RHS, FoundRHS))
if (isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_SGE, LHS, FoundLHS) &&
isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_SLE, RHS, FoundRHS))
return true;
break;
case ICmpInst::ICMP_ULT:
case ICmpInst::ICMP_ULE:
if (isKnownViaSimpleReasoning(ICmpInst::ICMP_ULE, LHS, FoundLHS) &&
isKnownViaSimpleReasoning(ICmpInst::ICMP_UGE, RHS, FoundRHS))
if (isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_ULE, LHS, FoundLHS) &&
isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_UGE, RHS, FoundRHS))
return true;
break;
case ICmpInst::ICMP_UGT:
case ICmpInst::ICMP_UGE:
if (isKnownViaSimpleReasoning(ICmpInst::ICMP_UGE, LHS, FoundLHS) &&
isKnownViaSimpleReasoning(ICmpInst::ICMP_ULE, RHS, FoundRHS))
if (isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_UGE, LHS, FoundLHS) &&
isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_ULE, RHS, FoundRHS))
return true;
break;
}