1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +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. /// 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. /// Use only simple non-recursive types of checks, such as range analysis etc.
bool isKnownViaSimpleReasoning(ICmpInst::Predicate Pred, bool isKnownViaNonRecursiveReasoning(ICmpInst::Predicate Pred,
const SCEV *LHS, const SCEV *RHS); const SCEV *LHS, const SCEV *RHS);
/// Test whether the condition described by Pred, LHS, and RHS is true /// Test whether the condition described by Pred, LHS, and RHS is true
/// whenever the condition described by Pred, FoundLHS, and FoundRHS is /// whenever the condition described by Pred, FoundLHS, and FoundRHS is

View File

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