aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-28 22:00:54 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-28 22:00:54 +0000
commit3da43849f2a2319ded6ed379ec8e7d620d6ac8c6 (patch)
tree15ae8b9a7ca2a7bcca10e5fabd55153ef7fee39c /include
parent8782d481a3c720304540254a7b71d25bbe7cbf49 (diff)
downloadexternal_llvm-3da43849f2a2319ded6ed379ec8e7d620d6ac8c6.zip
external_llvm-3da43849f2a2319ded6ed379ec8e7d620d6ac8c6.tar.gz
external_llvm-3da43849f2a2319ded6ed379ec8e7d620d6ac8c6.tar.bz2
Provide an ICmpInst::makeConstantRange to generate a ConstantRange value
from a predicate and an APInt. This is removed from ConstantRange class so that ConstantRange doesn't have to depend on lib/VMCore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Instructions.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index c78426a..337ae2a 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -24,6 +24,8 @@ class BasicBlock;
class ConstantInt;
class PointerType;
class VectorType;
+class ConstantRange;
+class APInt;
//===----------------------------------------------------------------------===//
// AllocationInst Class
@@ -536,6 +538,10 @@ public:
/// @brief Determine if the predicate is signed.
static bool isSignedPredicate(Predicate pred);
+ /// Initialize a set of values that all satisfy the predicate with C.
+ /// @brief Make a ConstantRange for a relation with a constant value.
+ static ConstantRange makeConstantRange(Predicate pred, const APInt &C);
+
/// Exchange the two operands to this instruction in such a way that it does
/// not modify the semantics of the instruction. The predicate value may be
/// changed to retain the same result if the predicate is order dependent