17SlowDynamicAPInt::SlowDynamicAPInt(int64_t Val)
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());
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.
APInt sadd_ov(const APInt &RHS, bool &Overflow) const
bool sle(const APInt &RHS) const
Signed less or equal comparison.
APInt sdiv_ov(const APInt &RHS, bool &Overflow) const
APInt srem(const APInt &RHS) const
Function for signed remainder operation.
APInt smul_ov(const APInt &RHS, bool &Overflow) const
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.
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.
void print(raw_ostream &OS) const
SlowDynamicAPInt operator%(const SlowDynamicAPInt &O) const
This operation cannot overflow.
SlowDynamicAPInt operator*(const SlowDynamicAPInt &O) const
SlowDynamicAPInt & operator+=(const SlowDynamicAPInt &O)
SlowDynamicAPInt & operator--()
LLVM_DUMP_METHOD void dump() const
bool operator<=(const SlowDynamicAPInt &O) const
SlowDynamicAPInt & operator-=(const SlowDynamicAPInt &O)
SlowDynamicAPInt & operator*=(const SlowDynamicAPInt &O)
SlowDynamicAPInt & operator=(int64_t Val)
SlowDynamicAPInt & operator++()
SlowDynamicAPInt operator-() const
bool operator!=(const SlowDynamicAPInt &O) const
bool operator>(const SlowDynamicAPInt &O) const
bool operator==(const SlowDynamicAPInt &O) const
SlowDynamicAPInt operator/(const SlowDynamicAPInt &O) const
SlowDynamicAPInt & operator/=(const SlowDynamicAPInt &O)
SlowDynamicAPInt & operator%=(const SlowDynamicAPInt &O)
bool operator<(const SlowDynamicAPInt &O) const
bool operator>=(const SlowDynamicAPInt &O) const
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.
APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM)
Return A sign-divided by B, rounded by the given rounding mode.
APInt GreatestCommonDivisor(APInt A, APInt B)
Compute GCD of two unsigned APInt values.
SlowDynamicAPInt abs(const SlowDynamicAPInt &X)
Redeclarations of friend declarations above to make it discoverable by lookups.
bool operator>=(const SlowDynamicAPInt &A, int64_t B)
SlowDynamicAPInt ceilDiv(const SlowDynamicAPInt &LHS, const SlowDynamicAPInt &RHS)
SlowDynamicAPInt operator/(const SlowDynamicAPInt &A, int64_t B)
SlowDynamicAPInt operator+(const SlowDynamicAPInt &A, int64_t B)
hash_code hash_value(const IEEEFloat &Arg)
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.
SlowDynamicAPInt gcd(const SlowDynamicAPInt &A, const SlowDynamicAPInt &B)
SlowDynamicAPInt floorDiv(const SlowDynamicAPInt &LHS, const SlowDynamicAPInt &RHS)
bool operator>(const SlowDynamicAPInt &A, int64_t B)
SlowDynamicAPInt & operator+=(SlowDynamicAPInt &A, int64_t B)
SlowDynamicAPInt operator%(const SlowDynamicAPInt &A, int64_t B)
SlowDynamicAPInt operator*(const SlowDynamicAPInt &A, int64_t B)
bool operator<=(const SlowDynamicAPInt &A, int64_t B)
SlowDynamicAPInt & operator/=(SlowDynamicAPInt &A, int64_t B)
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.
SlowDynamicAPInt mod(const SlowDynamicAPInt &LHS, const SlowDynamicAPInt &RHS)
Returns the remainder of dividing LHS by RHS.
SlowDynamicAPInt & operator*=(SlowDynamicAPInt &A, int64_t B)
bool operator<(const SlowDynamicAPInt &A, int64_t B)
SlowDynamicAPInt & operator-=(SlowDynamicAPInt &A, int64_t B)
SlowDynamicAPInt & operator%=(SlowDynamicAPInt &A, int64_t B)
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
DWARFExpression::Operation Op