From: Sanjoy Das Date: Mon, 1 Feb 2016 20:48:10 +0000 (+0000) Subject: [SCEV] Rename isKnownPredicateWithRanges; NFC X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=401e631c4b602cc89f4bd38331fc63ac878da1ac;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index ef93057..4bb602d3 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -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. diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 88361d6..8a50d43 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -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);