summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-18 15:22:39 +0000
committerDan Gohman <gohman@apple.com>2009-05-18 15:22:39 +0000
commit70a1fe704831f9b842be0b2a2af5f7082b0e540c (patch)
tree50ab317a552eeee19906877fbd6fce9b58bdb31b /include
parent04623272d29aa15b913f53748516b206d60c0f29 (diff)
downloadllvm-70a1fe704831f9b842be0b2a2af5f7082b0e540c.tar.gz
llvm-70a1fe704831f9b842be0b2a2af5f7082b0e540c.tar.bz2
llvm-70a1fe704831f9b842be0b2a2af5f7082b0e540c.tar.xz
Add an isOne() utility function to ScalarEvolution, similar to isZero()
and similar to ConstantInt's isOne(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index 76e23b1169..a5534e89c4 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -77,6 +77,10 @@ namespace llvm {
///
bool isZero() const;
+ /// isOne - Return true if the expression is a constant one.
+ ///
+ bool isOne() const;
+
/// replaceSymbolicValuesWithConcrete - If this SCEV internally references
/// the symbolic value "Sym", construct and return a new SCEV that produces
/// the same value, but which uses the concrete value Conc instead of the