32 #ifndef LLVM_IR_CONSTANTRANGE_H 33 #define LLVM_IR_CONSTANTRANGE_H 118 unsigned NoWrapKind);
136 bool isFullSet()
const;
139 bool isEmptySet()
const;
143 bool isWrappedSet()
const;
147 bool isSignWrappedSet()
const;
157 if (Upper == Lower + 1)
165 if (Lower == Upper + 1)
174 APInt getSetSize()
const;
177 bool isSizeStrictlySmallerThan(
const ConstantRange &CR)
const;
180 bool isSizeLargerThan(uint64_t MaxSize)
const;
183 APInt getUnsignedMax()
const;
186 APInt getUnsignedMin()
const;
189 APInt getSignedMax()
const;
192 APInt getSignedMin()
const;
196 return Lower == CR.Lower && Upper == CR.Upper;
346 #endif // LLVM_IR_CONSTANTRANGE_H
This class represents lattice values for constants.
const APInt & getUpper() const
Return the upper value for this range.
const APInt * getSingleElement() const
If this set contains a single element, return it, otherwise return null.
void print(raw_ostream &OS) const
Print out the bounds to a stream.
unsigned getBitWidth() const
Return the number of bits in the APInt.
return AArch64::GPR64RegClass contains(Reg)
#define LLVM_NODISCARD
LLVM_NODISCARD - Warn if a type or return value is discarded.
uint32_t getBitWidth() const
Get the bit width of this ConstantRange.
This file implements a class to represent arbitrary precision integral constant values and operations...
const APInt & smax(const APInt &A, const APInt &B)
Determine the larger of two APInts considered to be signed.
const APInt & smin(const APInt &A, const APInt &B)
Determine the smaller of two APInts considered to be signed.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
ConstantRange getConstantRangeFromMetadata(const MDNode &RangeMD)
Parse out a conservative ConstantRange from !range metadata.
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
bool operator!=(const ConstantRange &CR) const
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
const APInt & umin(const APInt &A, const APInt &B)
Determine the smaller of two APInts considered to be signed.
This class represents a range of values.
Class for arbitrary precision integers.
const APInt & umax(const APInt &A, const APInt &B)
Determine the larger of two APInts considered to be unsigned.
const APInt * getSingleMissingElement() const
If this set contains all but a single element, return it, otherwise return null.
const APInt & getLower() const
Return the lower value for this range.
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
bool isSingleElement() const
Return true if this set contains exactly one member.
LLVM Value Representation.
bool operator==(const ConstantRange &CR) const
Return true if this range is equal to another range.
This class implements an extremely fast bulk output stream that can only output to a stream...
bool operator==(uint64_t V1, const APInt &V2)