PandA-2024.02
|
#include <Range.hpp>
Public Types | |
using | bw_t = APInt::bw_t |
Public Member Functions | |
Range (RangeType type, bw_t bw) | |
Range (RangeType rType, bw_t bw, const APInt &lb, const APInt &ub) | |
virtual | ~Range ()=default |
Range (const Range &other)=default | |
Range (Range &&)=default | |
Range & | operator= (const Range &other)=default |
Range & | operator= (Range &&)=default |
bw_t | getBitWidth () const |
const APInt & | getLower () const |
const APInt & | getUpper () const |
APInt | getSignedMax () const |
APInt | getSignedMin () const |
APInt | getUnsignedMax () const |
APInt | getUnsignedMin () const |
APInt | getSpan () const |
virtual std::deque< bit_lattice > | getBitValues (bool isSigned) const |
virtual RangeRef | getAnti () const |
virtual bool | isUnknown () const |
virtual void | setUnknown () |
bool | isRegular () const |
bool | isAnti () const |
virtual bool | isEmpty () const |
virtual bool | isReal () const |
bool | operator== (const Range &other) const =delete |
bool | operator!= (const Range &other) const =delete |
bool | isSameType (const RangeConstRef &other) const |
virtual bool | isSameRange (const RangeConstRef &other) const |
virtual bool | isFullSet () const |
virtual bool | isSingleElement () const |
virtual bool | isConstant () const |
virtual Range * | clone () const |
virtual void | print (std::ostream &OS) const |
std::string | ToString () const |
RangeRef | add (const RangeConstRef &other) const |
RangeRef | sat_add (const RangeConstRef &other) const |
RangeRef | usat_add (const RangeConstRef &other) const |
RangeRef | sub (const RangeConstRef &other) const |
RangeRef | sat_sub (const RangeConstRef &other) const |
RangeRef | usat_sub (const RangeConstRef &other) const |
RangeRef | mul (const RangeConstRef &other) const |
RangeRef | udiv (const RangeConstRef &other) const |
RangeRef | sdiv (const RangeConstRef &other) const |
RangeRef | urem (const RangeConstRef &other) const |
RangeRef | srem (const RangeConstRef &other) const |
RangeRef | shl (const RangeConstRef &other) const |
RangeRef | shr (const RangeConstRef &other, bool sign) const |
virtual RangeRef | abs () const |
virtual RangeRef | negate () const |
RangeRef | Not () const |
RangeRef | And (const RangeConstRef &other) const |
RangeRef | Or (const RangeConstRef &other) const |
RangeRef | Xor (const RangeConstRef &other) const |
virtual RangeRef | Eq (const RangeConstRef &other, bw_t bw) const |
virtual RangeRef | Ne (const RangeConstRef &other, bw_t bw) const |
RangeRef | Ugt (const RangeConstRef &other, bw_t bw) const |
RangeRef | Uge (const RangeConstRef &other, bw_t bw) const |
RangeRef | Ult (const RangeConstRef &other, bw_t bw) const |
RangeRef | Ule (const RangeConstRef &other, bw_t bw) const |
RangeRef | UMin (const RangeConstRef &other) const |
RangeRef | UMax (const RangeConstRef &other) const |
RangeRef | Sgt (const RangeConstRef &other, bw_t bw) const |
RangeRef | Sge (const RangeConstRef &other, bw_t bw) const |
RangeRef | Slt (const RangeConstRef &other, bw_t bw) const |
RangeRef | Sle (const RangeConstRef &other, bw_t bw) const |
RangeRef | SMin (const RangeConstRef &other) const |
RangeRef | SMax (const RangeConstRef &other) const |
RangeRef | sextOrTrunc (bw_t bitwidth) const |
RangeRef | zextOrTrunc (bw_t bitwidth) const |
RangeRef | truncate (bw_t bitwidth) const |
virtual RangeRef | intersectWith (const RangeConstRef &other) const |
virtual RangeRef | unionWith (const RangeConstRef &other) const |
Static Public Member Functions | |
static RangeRef | makeSatisfyingCmpRegion (kind pred, const RangeConstRef &Other) |
static bw_t | neededBits (const APInt &a, const APInt &b, bool sign) |
static RangeRef | fromBitValues (const std::deque< bit_lattice > &bv, bw_t bitwidth, bool isSigned) |
Static Public Attributes | |
static const bw_t | max_digits = static_cast<bw_t>(std::numeric_limits<APInt::number>::digits) |
static const APInt | Min = APInt::getSignedMinValue(Range::max_digits) |
static const APInt | Max = APInt::getSignedMaxValue(Range::max_digits) |
static const APInt | MinDelta |
Private Member Functions | |
void | normalizeRange (const APInt &lb, const APInt &ub, RangeType rType) |
Private Attributes | |
APInt | l |
The lower bound of the range. More... | |
APInt | u |
The upper bound of the range. More... | |
bw_t | bw |
the range bit-width More... | |
RangeType | type |
the range type More... | |
using Range::bw_t = APInt::bw_t |
Definition at line 77 of file Range.cpp.
References max_digits, STR, and THROW_ASSERT.
Referenced by abs(), RealRange::abs(), add(), And(), clone(), Eq(), RealRange::Eq(), fromBitValues(), getAnti(), RealRange::getRange(), intersectWith(), makeSatisfyingCmpRegion(), mul(), Ne(), negate(), RealRange::negate(), Not(), Or(), RealRange::RealRange(), sat_add(), sat_sub(), sdiv(), sextOrTrunc(), Sge(), Sgt(), shl(), shr(), Sle(), Slt(), SMax(), SMin(), srem(), sub(), RealRange::toFloat32(), RealRange::toFloat64(), truncate(), udiv(), Uge(), Ugt(), Ule(), Ult(), UMax(), UMin(), unionWith(), urem(), usat_add(), usat_sub(), Xor(), and zextOrTrunc().
Definition at line 82 of file Range.cpp.
References max_digits, normalizeRange(), STR, and THROW_ASSERT.
|
virtualdefault |
|
default |
|
default |
|
virtual |
Reimplemented in RealRange.
Definition at line 2058 of file Range.cpp.
References Anti, bw, clone(), getSignedMax(), APInt::getSignedMaxValue(), getSignedMin(), APInt::getSignedMinValue(), isAnti(), isEmpty(), isUnknown(), l, max, min, Range(), Regular, and u.
Referenced by normalizeRange(), and truncate().
RangeRef Range::add | ( | const RangeConstRef & | other | ) | const |
Definition at line 652 of file Range.cpp.
References Anti, bw, getLower(), getSpan(), getUpper(), isAnti(), isFullSet(), isReal(), l, max, Max, Min, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, and u.
RangeRef Range::And | ( | const RangeConstRef & | other | ) | const |
Definition at line 1635 of file Range.cpp.
References AND, bw, clone(), getLower(), getSignedMax(), getUpper(), isAnti(), isConstant(), isReal(), Max, Min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
Referenced by RealRange::Eq().
|
virtual |
Reimplemented in RealRange.
Definition at line 88 of file Range.cpp.
References Range().
Referenced by abs(), And(), getAnti(), intersectWith(), negate(), Or(), sat_add(), sat_sub(), SMax(), SMin(), srem(), truncate(), UMax(), UMin(), unionWith(), usat_sub(), and Xor().
|
virtual |
Reimplemented in RealRange.
Definition at line 1699 of file Range.cpp.
References intersectWith(), isAnti(), isSameRange(), l, Max, Min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, THROW_UNREACHABLE, and u.
|
static |
Definition at line 365 of file Range.cpp.
References APInt::extOrTrunc(), max, min, ONE, Range(), Regular, BitLatticeManipulator::sign_extend_bitstring(), THROW_ASSERT, U, X, and ZERO.
Referenced by RealRange::fromBitValues().
|
virtual |
Reimplemented in RealRange.
Definition at line 464 of file Range.cpp.
References Anti, bw, clone(), Empty, l, Range(), Real, Regular, THROW_UNREACHABLE, type, u, and Unknown.
Referenced by intersectWith(), and unionWith().
|
virtual |
Reimplemented in RealRange.
Definition at line 420 of file Range.cpp.
References bw, create_bitstring_from_constant(), create_u_bitstring(), getSignedMax(), getSignedMin(), getUnsignedMax(), getUnsignedMin(), isAnti(), isConstant(), isEmpty(), isUnknown(), max, min, BitLatticeManipulator::sign_extend_bitstring(), BitLatticeManipulator::sign_reduce_bitstring(), and U.
bw_t Range::getBitWidth | ( | ) | const |
Definition at line 490 of file Range.cpp.
References bw.
Referenced by RealRange::getBitValues(), RealRange::getRange(), RealRange::isSameRange(), RealRange::print(), RealRange::RealRange(), RealRange::toFloat32(), and RealRange::toFloat64().
const APInt & Range::getLower | ( | ) | const |
Definition at line 495 of file Range.cpp.
References isAnti(), isReal(), l, and THROW_ASSERT.
Referenced by add(), And(), intersectWith(), isFullSet(), Or(), sat_add(), sat_sub(), sdiv(), shl(), srem(), sub(), unionWith(), usat_add(), usat_sub(), and Xor().
APInt Range::getSignedMax | ( | ) | const |
Definition at line 509 of file Range.cpp.
References bw, APInt::getSignedMaxValue(), isEmpty(), isReal(), isUnknown(), Regular, THROW_ASSERT, type, and u.
Referenced by abs(), And(), getBitValues(), mul(), Or(), sextOrTrunc(), Sge(), Sgt(), shr(), Sle(), Slt(), SMax(), SMin(), truncate(), and zextOrTrunc().
APInt Range::getSignedMin | ( | ) | const |
Definition at line 521 of file Range.cpp.
References bw, APInt::getSignedMinValue(), isEmpty(), isReal(), isUnknown(), l, Regular, THROW_ASSERT, and type.
Referenced by abs(), getBitValues(), mul(), sextOrTrunc(), Sge(), Sgt(), shr(), Sle(), Slt(), SMax(), SMin(), truncate(), and zextOrTrunc().
APInt Range::getSpan | ( | ) | const |
Definition at line 557 of file Range.cpp.
References bw, APInt::getMaxValue(), APInt::getSignedMaxValue(), APInt::getSignedMinValue(), isAnti(), isEmpty(), isFullSet(), isReal(), isUnknown(), l, Max, Min, THROW_ASSERT, and u.
Referenced by add(), sat_add(), sat_sub(), sub(), usat_add(), and usat_sub().
APInt Range::getUnsignedMax | ( | ) | const |
Definition at line 533 of file Range.cpp.
References bw, APInt::extOrTrunc(), APInt::getMaxValue(), isAnti(), isEmpty(), isReal(), isUnknown(), l, MinDelta, THROW_ASSERT, and u.
Referenced by getBitValues(), mul(), shr(), udiv(), Uge(), Ugt(), Ule(), Ult(), UMax(), UMin(), urem(), and zextOrTrunc().
APInt Range::getUnsignedMin | ( | ) | const |
Definition at line 546 of file Range.cpp.
References bw, APInt::extOrTrunc(), APInt::getMinValue(), isAnti(), isEmpty(), isReal(), isUnknown(), l, MinDelta, THROW_ASSERT, and u.
Referenced by getBitValues(), mul(), shr(), udiv(), Uge(), Ugt(), Ule(), Ult(), UMax(), UMin(), and urem().
const APInt & Range::getUpper | ( | ) | const |
Definition at line 502 of file Range.cpp.
References isAnti(), isReal(), THROW_ASSERT, and u.
Referenced by add(), And(), intersectWith(), isFullSet(), Or(), sat_add(), sat_sub(), sdiv(), shl(), srem(), sub(), unionWith(), usat_add(), usat_sub(), and Xor().
|
virtual |
Reimplemented in RealRange.
Definition at line 2242 of file Range.cpp.
References Anti, bw, clone(), Empty, getAnti(), getLower(), getUpper(), isAnti(), isReal(), Max, Min, PRINT_MSG, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
bool Range::isAnti | ( | ) | const |
Definition at line 592 of file Range.cpp.
Referenced by abs(), add(), And(), Eq(), getBitValues(), getLower(), getSpan(), getUnsignedMax(), getUnsignedMin(), getUpper(), intersectWith(), isFullSet(), mul(), Ne(), negate(), Or(), print(), sat_add(), sat_sub(), sdiv(), Sge(), Sgt(), shl(), shr(), Sle(), Slt(), SMax(), SMin(), srem(), sub(), truncate(), Uge(), Ugt(), Ule(), Ult(), UMax(), UMin(), unionWith(), urem(), usat_add(), usat_sub(), Xor(), and zextOrTrunc().
|
virtual |
Reimplemented in RealRange.
Definition at line 636 of file Range.cpp.
References isRegular(), l, and u.
Referenced by And(), getBitValues(), Or(), and shl().
|
virtual |
Reimplemented in RealRange.
Definition at line 597 of file Range.cpp.
Referenced by abs(), getBitValues(), getSignedMax(), getSignedMin(), getSpan(), getUnsignedMax(), getUnsignedMin(), isFullSet(), isSingleElement(), negate(), Not(), print(), sextOrTrunc(), truncate(), unionWith(), and zextOrTrunc().
|
virtual |
Reimplemented in RealRange.
Definition at line 617 of file Range.cpp.
References bw, getLower(), APInt::getSignedMaxValue(), APInt::getSignedMinValue(), getUpper(), isAnti(), isEmpty(), isUnknown(), and THROW_ASSERT.
Referenced by add(), getSpan(), mul(), sat_add(), sat_sub(), sdiv(), shl(), srem(), sub(), truncate(), udiv(), usat_add(), and usat_sub().
|
virtual |
Reimplemented in RealRange.
Definition at line 602 of file Range.cpp.
Referenced by add(), And(), getLower(), getSignedMax(), getSignedMin(), getSpan(), getUnsignedMax(), getUnsignedMin(), getUpper(), intersectWith(), mul(), negate(), Not(), Or(), RealRange::RealRange(), sat_add(), sat_sub(), sdiv(), sextOrTrunc(), Sge(), Sgt(), shl(), shr(), Sle(), Slt(), SMax(), SMin(), srem(), sub(), truncate(), udiv(), Uge(), Ugt(), Ule(), Ult(), UMax(), UMin(), unionWith(), urem(), usat_add(), usat_sub(), Xor(), and zextOrTrunc().
bool Range::isRegular | ( | ) | const |
Definition at line 587 of file Range.cpp.
Referenced by isConstant().
|
virtual |
bool Range::isSameType | ( | const RangeConstRef & | other | ) | const |
Definition at line 607 of file Range.cpp.
References type.
Referenced by isSameRange().
|
virtual |
|
virtual |
Reimplemented in RealRange.
Definition at line 577 of file Range.cpp.
Referenced by abs(), getBitValues(), getSignedMax(), getSignedMin(), getSpan(), getUnsignedMax(), getUnsignedMin(), isFullSet(), isSingleElement(), negate(), Not(), print(), sextOrTrunc(), truncate(), unionWith(), and zextOrTrunc().
|
static |
Definition at line 2529 of file Range.cpp.
References bw, CASE_CPP_NODES, CASE_CST_NODES, CASE_DECL_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_MISCELLANEOUS, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, Empty, APInt::getMaxValue(), APInt::getMinValue(), APInt::getSignedMaxValue(), APInt::getSignedMinValue(), tree_node::GetString(), MinDelta, Range(), Regular, STR, and THROW_UNREACHABLE.
Referenced by TernaryOpNode::eval().
RangeRef Range::mul | ( | const RangeConstRef & | other | ) | const |
Definition at line 1013 of file Range.cpp.
References bw, getSignedMax(), getSignedMin(), getUnsignedMax(), getUnsignedMin(), isAnti(), isFullSet(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
|
virtual |
Reimplemented in RealRange.
Definition at line 1735 of file Range.cpp.
References intersectWith(), isAnti(), isSameRange(), l, Max, Min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, THROW_UNREACHABLE, and u.
Definition at line 360 of file Range.cpp.
References max, and APInt::minBitwidth().
Referenced by VarNode::updateIR().
|
virtual |
Definition at line 93 of file Range.cpp.
References abs(), Anti, bw, Empty, APInt::extOrTrunc(), APInt::getMaxValue(), APInt::getSignedMaxValue(), APInt::getSignedMinValue(), l, Max, Min, MinDelta, Real, Regular, THROW_ASSERT, THROW_UNREACHABLE, type, u, and Unknown.
Referenced by Range().
RangeRef Range::Not | ( | ) | const |
RangeRef Range::Or | ( | const RangeConstRef & | other | ) | const |
Definition at line 1612 of file Range.cpp.
References bw, clone(), getLower(), getSignedMax(), getUpper(), isAnti(), isConstant(), isReal(), Max, Min, OR, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
|
virtual |
Reimplemented in RealRange.
Definition at line 2464 of file Range.cpp.
References bw, isAnti(), isEmpty(), isUnknown(), l, Max, Min, and u.
Referenced by operator<<(), and ToString().
RangeRef Range::sat_add | ( | const RangeConstRef & | other | ) | const |
Definition at line 701 of file Range.cpp.
References bw, clone(), getLower(), APInt::getSignedMaxValue(), APInt::getSignedMinValue(), getSpan(), getUpper(), isAnti(), isFullSet(), isReal(), l, max, Max, Min, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, and u.
RangeRef Range::sat_sub | ( | const RangeConstRef & | other | ) | const |
Definition at line 889 of file Range.cpp.
References Anti, bw, clone(), getLower(), APInt::getSignedMaxValue(), APInt::getSignedMinValue(), getSpan(), getUpper(), isAnti(), isFullSet(), isReal(), l, max, Max, Min, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, and u.
RangeRef Range::sdiv | ( | const RangeConstRef & | other | ) | const |
could be improved
could be improved
Definition at line 1091 of file Range.cpp.
References bw, c1, c2, DIV_HELPER, getLower(), getUpper(), isAnti(), isFullSet(), isReal(), Max, Min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, and u.
|
virtual |
RangeRef Range::sextOrTrunc | ( | bw_t | bitwidth | ) | const |
Definition at line 2181 of file Range.cpp.
References bw, Empty, getSignedMax(), getSignedMin(), isEmpty(), isReal(), isUnknown(), Range(), Regular, THROW_ASSERT, truncate(), and Unknown.
RangeRef Range::Sge | ( | const RangeConstRef & | other, |
bw_t | bw | ||
) | const |
Definition at line 1900 of file Range.cpp.
References getSignedMax(), getSignedMin(), isAnti(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
RangeRef Range::Sgt | ( | const RangeConstRef & | other, |
bw_t | bw | ||
) | const |
Definition at line 1874 of file Range.cpp.
References getSignedMax(), getSignedMin(), isAnti(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
Referenced by SMax().
RangeRef Range::shl | ( | const RangeConstRef & | other | ) | const |
Definition at line 1266 of file Range.cpp.
References bw, ceil_log2(), APInt::extOrTrunc(), getLower(), getUpper(), isAnti(), isConstant(), isFullSet(), isReal(), min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
RangeRef Range::shr | ( | const RangeConstRef & | other, |
bool | sign | ||
) | const |
Definition at line 1319 of file Range.cpp.
References AND, bw, ceil_log2(), getSignedMax(), getSignedMin(), getUnsignedMax(), getUnsignedMin(), isAnti(), isReal(), max, min, mm(), OR, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, STR, THROW_ASSERT, THROW_UNREACHABLE, and U.
RangeRef Range::Sle | ( | const RangeConstRef & | other, |
bw_t | bw | ||
) | const |
Definition at line 1952 of file Range.cpp.
References getSignedMax(), getSignedMin(), isAnti(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
RangeRef Range::Slt | ( | const RangeConstRef & | other, |
bw_t | bw | ||
) | const |
Definition at line 1926 of file Range.cpp.
References getSignedMax(), getSignedMin(), isAnti(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
Referenced by SMin().
RangeRef Range::SMax | ( | const RangeConstRef & | other | ) | const |
Definition at line 1998 of file Range.cpp.
References bw, clone(), getSignedMax(), getSignedMin(), isAnti(), isReal(), max, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, Sgt(), and THROW_ASSERT.
RangeRef Range::SMin | ( | const RangeConstRef & | other | ) | const |
Definition at line 1978 of file Range.cpp.
References bw, clone(), getSignedMax(), getSignedMin(), isAnti(), isReal(), max, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, Slt(), and THROW_ASSERT.
RangeRef Range::srem | ( | const RangeConstRef & | other | ) | const |
Definition at line 1229 of file Range.cpp.
References bw, clone(), getLower(), getUpper(), isAnti(), isFullSet(), isReal(), max, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
RangeRef Range::sub | ( | const RangeConstRef & | other | ) | const |
Definition at line 819 of file Range.cpp.
References Anti, bw, getLower(), APInt::getSignedMaxValue(), APInt::getSignedMinValue(), getSpan(), getUpper(), isAnti(), isFullSet(), isReal(), l, max, Max, Min, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, and u.
Referenced by Xor().
std::string Range::ToString | ( | ) | const |
Definition at line 2516 of file Range.cpp.
References print().
Referenced by RealRange::RealRange().
RangeRef Range::truncate | ( | bw_t | bitwidth | ) | const |
Definition at line 2125 of file Range.cpp.
References abs(), Anti, bw, clone(), Empty, APInt::getMaxValue(), getSignedMax(), getSignedMin(), isAnti(), isEmpty(), isFullSet(), isReal(), isUnknown(), Range(), Regular, THROW_ASSERT, and Unknown.
Referenced by sextOrTrunc(), and zextOrTrunc().
RangeRef Range::udiv | ( | const RangeConstRef & | other | ) | const |
Definition at line 1057 of file Range.cpp.
References bw, getUnsignedMax(), getUnsignedMin(), isFullSet(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
RangeRef Range::Uge | ( | const RangeConstRef & | other, |
bw_t | bw | ||
) | const |
Definition at line 1796 of file Range.cpp.
References getUnsignedMax(), getUnsignedMin(), isAnti(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
RangeRef Range::Ugt | ( | const RangeConstRef & | other, |
bw_t | bw | ||
) | const |
Definition at line 1770 of file Range.cpp.
References getUnsignedMax(), getUnsignedMin(), isAnti(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
Referenced by UMax().
RangeRef Range::Ule | ( | const RangeConstRef & | other, |
bw_t | bw | ||
) | const |
Definition at line 1848 of file Range.cpp.
References getUnsignedMax(), getUnsignedMin(), isAnti(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
RangeRef Range::Ult | ( | const RangeConstRef & | other, |
bw_t | bw | ||
) | const |
Definition at line 1822 of file Range.cpp.
References getUnsignedMax(), getUnsignedMin(), isAnti(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
Referenced by UMin().
RangeRef Range::UMax | ( | const RangeConstRef & | other | ) | const |
Definition at line 2038 of file Range.cpp.
References bw, clone(), getUnsignedMax(), getUnsignedMin(), isAnti(), isReal(), max, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, and Ugt().
RangeRef Range::UMin | ( | const RangeConstRef & | other | ) | const |
Definition at line 2018 of file Range.cpp.
References bw, clone(), getUnsignedMax(), getUnsignedMin(), isAnti(), isReal(), max, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, and Ult().
|
virtual |
Reimplemented in RealRange.
Definition at line 2356 of file Range.cpp.
References Anti, bw, clone(), getAnti(), getLower(), getUpper(), isAnti(), isEmpty(), isReal(), isUnknown(), Max, Min, PRINT_MSG, Range(), Regular, THROW_ASSERT, and THROW_UNREACHABLE.
RangeRef Range::urem | ( | const RangeConstRef & | other | ) | const |
Definition at line 1177 of file Range.cpp.
References bw, Empty, getUnsignedMax(), getUnsignedMin(), isAnti(), isReal(), Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, and THROW_ASSERT.
RangeRef Range::usat_add | ( | const RangeConstRef & | other | ) | const |
Definition at line 770 of file Range.cpp.
References Anti, bw, getLower(), APInt::getMaxValue(), getSpan(), getUpper(), isAnti(), isFullSet(), isReal(), l, max, Max, Min, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, and u.
RangeRef Range::usat_sub | ( | const RangeConstRef & | other | ) | const |
Definition at line 954 of file Range.cpp.
References bw, clone(), getLower(), APInt::getMaxValue(), getSpan(), getUpper(), isAnti(), isFullSet(), isReal(), l, max, Max, Min, min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, THROW_ASSERT, and u.
RangeRef Range::Xor | ( | const RangeConstRef & | other | ) | const |
Definition at line 1658 of file Range.cpp.
References bw, clone(), getLower(), getUpper(), isAnti(), isReal(), Max, Min, Range(), Regular, RETURN_EMPTY_ON_EMPTY, RETURN_UNKNOWN_ON_UNKNOWN, sub(), and THROW_ASSERT.
RangeRef Range::zextOrTrunc | ( | bw_t | bitwidth | ) | const |
Definition at line 2209 of file Range.cpp.
References bw, Empty, APInt::getMaxValue(), getSignedMax(), getSignedMin(), getUnsignedMax(), isAnti(), isEmpty(), isReal(), isUnknown(), Range(), Regular, THROW_ASSERT, truncate(), u, and Unknown.
Referenced by RealRange::Eq().
|
private |
the range bit-width
Definition at line 74 of file Range.hpp.
Referenced by abs(), add(), And(), getAnti(), getBitValues(), getBitWidth(), getSignedMax(), getSignedMin(), getSpan(), getUnsignedMax(), getUnsignedMin(), intersectWith(), isFullSet(), isSameRange(), makeSatisfyingCmpRegion(), mul(), negate(), normalizeRange(), Not(), Or(), print(), sat_add(), sat_sub(), sdiv(), sextOrTrunc(), shl(), shr(), SMax(), SMin(), srem(), sub(), truncate(), udiv(), UMax(), UMin(), unionWith(), urem(), usat_add(), usat_sub(), Xor(), and zextOrTrunc().
|
private |
The lower bound of the range.
Definition at line 70 of file Range.hpp.
Referenced by abs(), add(), Eq(), getAnti(), getLower(), getSignedMin(), getSpan(), getUnsignedMax(), getUnsignedMin(), isConstant(), isSameRange(), isSingleElement(), Ne(), negate(), normalizeRange(), print(), sat_add(), sat_sub(), sub(), usat_add(), and usat_sub().
|
static |
Definition at line 163 of file Range.hpp.
Referenced by add(), And(), Eq(), Meet::getFirstGreaterFromVector(), getSpan(), Meet::growth(), intersectWith(), Meet::narrow(), Ne(), normalizeRange(), Or(), print(), sat_add(), sat_sub(), sdiv(), SymbRange::solveFuture(), VarNode::storeAbstractState(), sub(), unionWith(), usat_add(), usat_sub(), and Xor().
|
static |
Definition at line 161 of file Range.hpp.
Referenced by ControlDepNode::eval(), evaluateBranch(), RealRange::getRange(), Range(), and RealRange::RealRange().
|
static |
Definition at line 162 of file Range.hpp.
Referenced by add(), And(), Eq(), Meet::getFirstLessFromVector(), getSpan(), Meet::growth(), intersectWith(), Meet::narrow(), Ne(), normalizeRange(), Or(), print(), sat_add(), sat_sub(), sdiv(), SymbRange::solveFuture(), VarNode::storeAbstractState(), sub(), unionWith(), usat_add(), usat_sub(), and Xor().
|
static |
Definition at line 164 of file Range.hpp.
Referenced by getUnsignedMax(), getUnsignedMin(), makeSatisfyingCmpRegion(), and normalizeRange().
|
private |
the range type
Definition at line 76 of file Range.hpp.
Referenced by getAnti(), getSignedMax(), getSignedMin(), isAnti(), isEmpty(), isRegular(), isSameType(), isUnknown(), normalizeRange(), Not(), and setUnknown().
|
private |
The upper bound of the range.
Definition at line 72 of file Range.hpp.
Referenced by abs(), add(), Eq(), getAnti(), getSignedMax(), getSpan(), getUnsignedMax(), getUnsignedMin(), getUpper(), isConstant(), isSameRange(), isSingleElement(), Ne(), negate(), normalizeRange(), print(), sat_add(), sat_sub(), sdiv(), sub(), usat_add(), usat_sub(), and zextOrTrunc().