Skip to content

Commit

Permalink
NFC. Make ScalarEvolution::isMonotonicPredicate public
Browse files Browse the repository at this point in the history
Will be used by the upcoming LoopPredication optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293062 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
arpilipe committed Jan 25, 2017
1 parent c6141d3 commit cd80532
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions include/llvm/Analysis/ScalarEvolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -1065,18 +1065,6 @@ class ScalarEvolution {
bool isMonotonicPredicateImpl(const SCEVAddRecExpr *LHS,
ICmpInst::Predicate Pred, bool &Increasing);

/// Return true if, for all loop invariant X, the predicate "LHS `Pred` X"
/// is monotonically increasing or decreasing. In the former case set
/// `Increasing` to true and in the latter case set `Increasing` to false.
///
/// A predicate is said to be monotonically increasing if may go from being
/// false to being true as the loop iterates, but never the other way
/// around. A predicate is said to be monotonically decreasing if may go
/// from being true to being false as the loop iterates, but never the other
/// way around.
bool isMonotonicPredicate(const SCEVAddRecExpr *LHS, ICmpInst::Predicate Pred,
bool &Increasing);

/// Return SCEV no-wrap flags that can be proven based on reasoning about
/// how poison produced from no-wrap flags on this value (e.g. a nuw add)
/// would trigger undefined behavior on overflow.
Expand Down Expand Up @@ -1432,6 +1420,18 @@ class ScalarEvolution {
bool isKnownPredicate(ICmpInst::Predicate Pred, const SCEV *LHS,
const SCEV *RHS);

/// Return true if, for all loop invariant X, the predicate "LHS `Pred` X"
/// is monotonically increasing or decreasing. In the former case set
/// `Increasing` to true and in the latter case set `Increasing` to false.
///
/// A predicate is said to be monotonically increasing if may go from being
/// false to being true as the loop iterates, but never the other way
/// around. A predicate is said to be monotonically decreasing if may go
/// from being true to being false as the loop iterates, but never the other
/// way around.
bool isMonotonicPredicate(const SCEVAddRecExpr *LHS, ICmpInst::Predicate Pred,
bool &Increasing);

/// Return true if the result of the predicate LHS `Pred` RHS is loop
/// invariant with respect to L. Set InvariantPred, InvariantLHS and
/// InvariantLHS so that InvariantLHS `InvariantPred` InvariantRHS is the
Expand Down

0 comments on commit cd80532

Please sign in to comment.