summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/ScalarEvolution.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-05-30 18:32:23 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-05-30 18:32:23 +0000
commit6cf07a80ff5ee8ef7dc336f954aae17c7e8d83d4 (patch)
treea47c39f352c87564a19069dc27f70320e4611319 /include/llvm/Analysis/ScalarEvolution.h
parentf186df0d3e64d1b6f61da39ce882530bf387029e (diff)
downloadllvm-6cf07a80ff5ee8ef7dc336f954aae17c7e8d83d4.tar.gz
llvm-6cf07a80ff5ee8ef7dc336f954aae17c7e8d83d4.tar.bz2
llvm-6cf07a80ff5ee8ef7dc336f954aae17c7e8d83d4.tar.xz
Teach SCEV's icmp simplification logic that a-b == 0 is equivalent to a == b.
This also required making recursive simplifications until nothing changes or a hard limit (currently 3) is hit. With the simplification in place indvars can canonicalize loops of the form for (unsigned i = 0; i < a-b; ++i) into for (unsigned i = 0; i != a-b; ++i) which used to fail because SCEV created a weird umax expr for the backedge taken count. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157701 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolution.h')
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index 8f87b58fe7..c213ade5e8 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -837,7 +837,8 @@ namespace llvm {
///
bool SimplifyICmpOperands(ICmpInst::Predicate &Pred,
const SCEV *&LHS,
- const SCEV *&RHS);
+ const SCEV *&RHS,
+ unsigned Depth = 0);
/// getLoopDisposition - Return the "disposition" of the given SCEV with
/// respect to the given loop.