mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Move a method that creates constant ranges relative to another constant range
per icmp predicate out of predsimplify and into ConstantRange. Add another utility method that determines whether one range is a subset of another. Combine with the former to determine whether icmp pred range, range is known to be true or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75357 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -58,6 +58,12 @@ public:
|
||||
/// assert out if the two APInt's are not the same bit width.
|
||||
ConstantRange(const APInt& Lower, const APInt& Upper);
|
||||
|
||||
/// makeICmpRegion - Return the range of values that a value must be within
|
||||
/// in order for the comparison specified by the predicate against range
|
||||
/// Other to be true.
|
||||
static ConstantRange makeICmpRegion(unsigned Pred,
|
||||
const ConstantRange &Other);
|
||||
|
||||
/// getLower - Return the lower value for this range...
|
||||
///
|
||||
const APInt &getLower() const { return Lower; }
|
||||
@@ -88,6 +94,10 @@ public:
|
||||
///
|
||||
bool contains(const APInt &Val) const;
|
||||
|
||||
/// contains - Return true if the other range is a subset of this one.
|
||||
///
|
||||
bool contains(const ConstantRange &CR) const;
|
||||
|
||||
/// getSingleElement - If this set contains a single element, return it,
|
||||
/// otherwise return null.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user