aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/IR/ConstantRange.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:01:22 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:01:22 +0000
commit71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch)
tree5343938942df402b49ec7300a1c25a2d4ccd5821 /include/llvm/IR/ConstantRange.h
parent31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff)
Diffstat (limited to 'include/llvm/IR/ConstantRange.h')
-rw-r--r--include/llvm/IR/ConstantRange.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/llvm/IR/ConstantRange.h b/include/llvm/IR/ConstantRange.h
index 27a9b1364448..6d704666933f 100644
--- a/include/llvm/IR/ConstantRange.h
+++ b/include/llvm/IR/ConstantRange.h
@@ -45,9 +45,6 @@ class MDNode;
class ConstantRange {
APInt Lower, Upper;
- // If we have move semantics, pass APInts by value and move them into place.
- typedef APInt APIntMoveTy;
-
public:
/// Initialize a full (the default) or empty set for the specified bit width.
///
@@ -55,12 +52,12 @@ public:
/// Initialize a range to hold the single specified value.
///
- ConstantRange(APIntMoveTy Value);
+ ConstantRange(APInt Value);
/// @brief Initialize a range of values explicitly. This will assert out if
/// Lower==Upper and Lower != Min or Max value for its type. It will also
/// assert out if the two APInt's are not the same bit width.
- ConstantRange(APIntMoveTy Lower, APIntMoveTy Upper);
+ ConstantRange(APInt Lower, APInt Upper);
/// Produce the smallest range such that all values that may satisfy the given
/// predicate with any value contained within Other is contained in the
@@ -184,6 +181,10 @@ public:
///
APInt getSetSize() const;
+ /// Compare set size of this range with the range CR.
+ ///
+ bool isSizeStrictlySmallerThanOf(const ConstantRange &CR) const;
+
/// Return the largest unsigned value contained in the ConstantRange.
///
APInt getUnsignedMax() const;