18 : Val(64, Val,
true) {}
24SlowDynamicAPInt::operator int64_t()
const {
return Val.getSExtValue(); }
118 return std::max(
A.getBitWidth(),
B.getBitWidth());
128 return Val.
sext(Width) == O.Val.sext(Width);
132 return Val.
sext(Width) != O.Val.sext(Width);
136 return Val.
sext(Width).
sgt(O.Val.sext(Width));
140 return Val.
sext(Width).
slt(O.Val.sext(Width));
144 return Val.
sext(Width).
sle(O.Val.sext(Width));
148 return Val.
sext(Width).
sge(O.Val.sext(Width));
164 APInt Ret =
Op(
A.sext(Width),
B.sext(Width), Overflow);
169 Ret =
Op(
A.sext(Width),
B.sext(Width), Overflow);
170 assert(!Overflow &&
"double width should be sufficient to avoid overflow!");
191 return X >= 0 ?
X : -
X;
213 assert(
RHS >= 1 &&
"mod is only supported for positive divisors!");
219 assert(
A >= 0 &&
B >= 0 &&
"operands must be non-negative!");
235 unsigned Width = std::max(Val.
getBitWidth(), O.Val.getBitWidth());
286#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
APInt runOpWithExpandOnOverflow(const APInt &A, const APInt &B, function_ref< APInt(const APInt &, const APInt &, bool &Overflow)> Op)
Bring a and b to have the same width and then call op(a, b, overflow).
static unsigned getMaxWidth(const APInt &A, const APInt &B)
Class for arbitrary precision integers.
bool isMinSignedValue() const
Determine if this is the smallest signed value.
bool sgt(const APInt &RHS) const
Signed greater than comparison.
unsigned getBitWidth() const
Return the number of bits in the APInt.
LLVM_ABI APInt sadd_ov(const APInt &RHS, bool &Overflow) const
bool sle(const APInt &RHS) const
Signed less or equal comparison.
LLVM_ABI APInt sdiv_ov(const APInt &RHS, bool &Overflow) const
LLVM_ABI APInt srem(const APInt &RHS) const
Function for signed remainder operation.
LLVM_ABI APInt smul_ov(const APInt &RHS, bool &Overflow) const
LLVM_ABI APInt sext(unsigned width) const
Sign extend to a new width.
bool slt(const APInt &RHS) const
Signed less than comparison.
bool sge(const APInt &RHS) const
Signed greater or equal comparison.
LLVM_ABI APInt ssub_ov(const APInt &RHS, bool &Overflow) const
This class represents an Operation in the Expression.
A simple class providing dynamic arbitrary-precision arithmetic.
LLVM_ABI void print(raw_ostream &OS) const
LLVM_ABI SlowDynamicAPInt()
LLVM_ABI SlowDynamicAPInt operator%(const SlowDynamicAPInt &O) const
This operation cannot overflow.
LLVM_ABI SlowDynamicAPInt operator*(const SlowDynamicAPInt &O) const
LLVM_ABI SlowDynamicAPInt & operator+=(const SlowDynamicAPInt &O)
LLVM_ABI SlowDynamicAPInt & operator--()
LLVM_ABI bool operator<=(const SlowDynamicAPInt &O) const
LLVM_ABI SlowDynamicAPInt & operator-=(const SlowDynamicAPInt &O)
LLVM_ABI SlowDynamicAPInt & operator*=(const SlowDynamicAPInt &O)
LLVM_ABI SlowDynamicAPInt & operator=(int64_t Val)
LLVM_ABI SlowDynamicAPInt & operator++()
LLVM_ABI SlowDynamicAPInt operator-() const
LLVM_ABI bool operator!=(const SlowDynamicAPInt &O) const
LLVM_ABI bool operator>(const SlowDynamicAPInt &O) const
LLVM_ABI bool operator==(const SlowDynamicAPInt &O) const
LLVM_ABI SlowDynamicAPInt operator/(const SlowDynamicAPInt &O) const
LLVM_DUMP_METHOD void dump() const
LLVM_ABI SlowDynamicAPInt & operator/=(const SlowDynamicAPInt &O)
LLVM_ABI SlowDynamicAPInt & operator%=(const SlowDynamicAPInt &O)
LLVM_ABI bool operator<(const SlowDynamicAPInt &O) const
LLVM_ABI bool operator>=(const SlowDynamicAPInt &O) const
LLVM_ABI SlowDynamicAPInt operator+(const SlowDynamicAPInt &O) const
An efficient, type-erasing, non-owning reference to a callable.
An opaque object representing a hash code.
This class implements an extremely fast bulk output stream that can only output to a stream.
LLVM_ABI APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM)
Return A sign-divided by B, rounded by the given rounding mode.
LLVM_ABI APInt GreatestCommonDivisor(APInt A, APInt B)
Compute GCD of two unsigned APInt values.
These are wrappers over isa* function that allow them to be used in generic algorithms such as llvm:a...
LLVM_ABI SlowDynamicAPInt abs(const SlowDynamicAPInt &X)
Redeclarations of friend declarations above to make it discoverable by lookups.
LLVM_ABI bool operator>=(const SlowDynamicAPInt &A, int64_t B)
LLVM_ABI SlowDynamicAPInt ceilDiv(const SlowDynamicAPInt &LHS, const SlowDynamicAPInt &RHS)
LLVM_ABI SlowDynamicAPInt operator/(const SlowDynamicAPInt &A, int64_t B)
LLVM_ABI SlowDynamicAPInt operator+(const SlowDynamicAPInt &A, int64_t B)
LLVM_ABI hash_code hash_value(const IEEEFloat &Arg)
LLVM_ABI SlowDynamicAPInt operator-(const SlowDynamicAPInt &A, int64_t B)
bool operator!=(const DenseSetImpl< ValueT, MapTy, ValueInfoT > &LHS, const DenseSetImpl< ValueT, MapTy, ValueInfoT > &RHS)
Inequality comparison for DenseSet.
LLVM_ABI SlowDynamicAPInt gcd(const SlowDynamicAPInt &A, const SlowDynamicAPInt &B)
LLVM_ABI SlowDynamicAPInt floorDiv(const SlowDynamicAPInt &LHS, const SlowDynamicAPInt &RHS)
LLVM_ABI bool operator>(const SlowDynamicAPInt &A, int64_t B)
LLVM_ABI SlowDynamicAPInt & operator+=(SlowDynamicAPInt &A, int64_t B)
LLVM_ABI SlowDynamicAPInt operator%(const SlowDynamicAPInt &A, int64_t B)
LLVM_ABI SlowDynamicAPInt operator*(const SlowDynamicAPInt &A, int64_t B)
LLVM_ABI bool operator<=(const SlowDynamicAPInt &A, int64_t B)
LLVM_ABI SlowDynamicAPInt & operator/=(SlowDynamicAPInt &A, int64_t B)
LLVM_ABI SlowDynamicAPInt lcm(const SlowDynamicAPInt &A, const SlowDynamicAPInt &B)
Returns the least common multiple of A and B.
bool operator==(const DenseSetImpl< ValueT, MapTy, ValueInfoT > &LHS, const DenseSetImpl< ValueT, MapTy, ValueInfoT > &RHS)
Equality comparison for DenseSet.
LLVM_ABI SlowDynamicAPInt mod(const SlowDynamicAPInt &LHS, const SlowDynamicAPInt &RHS)
Returns the remainder of dividing LHS by RHS.
LLVM_ABI SlowDynamicAPInt & operator*=(SlowDynamicAPInt &A, int64_t B)
LLVM_ABI bool operator<(const SlowDynamicAPInt &A, int64_t B)
LLVM_ABI SlowDynamicAPInt & operator-=(SlowDynamicAPInt &A, int64_t B)
LLVM_ABI SlowDynamicAPInt & operator%=(SlowDynamicAPInt &A, int64_t B)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
DWARFExpression::Operation Op