Lines Matching full:constantrange
1 //===- ConstantRange.h - Represent a range ----------------------*- C++ -*-===//
27 // Note that ConstantRange can be used to represent either signed or
43 class ConstantRange {
52 explicit ConstantRange(uint32_t BitWidth, bool isFullSet = true);
56 ConstantRange(APIntMoveTy Value);
61 ConstantRange(APIntMoveTy Lower, APIntMoveTy Upper);
67 /// answer is not representable as a ConstantRange, the return value will be a
71 static ConstantRange makeAllowedICmpRegion(CmpInst::Predicate Pred,
72 const ConstantRange &Other);
78 /// exact answer is not representable as a ConstantRange, the return value
82 static ConstantRange makeSatisfyingICmpRegion(CmpInst::Predicate Pred,
83 const ConstantRange &Other);
93 static ConstantRange makeNoWrapRegion(Instruction::BinaryOps BinOp,
104 /// Get the bit width of this ConstantRange.
133 bool contains(const ConstantRange &CR) const;
151 /// Return the largest unsigned value contained in the ConstantRange.
155 /// Return the smallest unsigned value contained in the ConstantRange.
159 /// Return the largest signed value contained in the ConstantRange.
163 /// Return the smallest signed value contained in the ConstantRange.
169 bool operator==(const ConstantRange &CR) const {
172 bool operator!=(const ConstantRange &CR) const {
177 ConstantRange subtract(const APInt &CI) const;
181 ConstantRange difference(const ConstantRange &CR) const;
190 ConstantRange intersectWith(const ConstantRange &CR) const;
198 ConstantRange unionWith(const ConstantRange &CR) const;
204 ConstantRange zeroExtend(uint32_t BitWidth) const;
210 ConstantRange signExtend(uint32_t BitWidth) const;
216 ConstantRange truncate(uint32_t BitWidth) const;
220 ConstantRange zextOrTrunc(uint32_t BitWidth) const;
224 ConstantRange sextOrTrunc(uint32_t BitWidth) const;
228 ConstantRange add(const ConstantRange &Other) const;
232 ConstantRange sub(const ConstantRange &Other) const;
237 ConstantRange multiply(const ConstantRange &Other) const;
241 ConstantRange smax(const ConstantRange &Other) const;
245 ConstantRange umax(const ConstantRange &Other) const;
250 ConstantRange udiv(const ConstantRange &Other) const;
254 ConstantRange binaryAnd(const ConstantRange &Other) const;
258 ConstantRange binaryOr(const ConstantRange &Other) const;
263 ConstantRange shl(const ConstantRange &Other) const;
267 ConstantRange lshr(const ConstantRange &Other) const;
271 ConstantRange inverse() const;
282 inline raw_ostream &operator<<(raw_ostream &OS, const ConstantRange &CR) {