24 unsigned NumBits = ((Str.
size() * 64) / 19) + 2;
25 APInt Tmp(NumBits, Str, 10);
28 if (MinBits > 0 && MinBits < NumBits)
29 Tmp = Tmp.
trunc(MinBits);
30 *
this =
APSInt(Tmp,
false);
34 if (ActiveBits > 0 && ActiveBits < NumBits)
35 Tmp = Tmp.
trunc(ActiveBits);
40 ID.
AddInteger((
unsigned) (IsUnsigned ? 1 : 0));
void Profile(FoldingSetNodeID &id) const
Used to insert APInt objects, or objects that contain APInt objects, into FoldingSets.
This class represents lattice values for constants.
APSInt()
Default constructor that creates an uninitialized APInt.
APInt trunc(unsigned width) const
Truncate to new width.
void AddInteger(signed I)
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
unsigned getActiveBits() const
Compute the number of active bits in the value.
void Profile(FoldingSetNodeID &ID) const
Profile - Used to insert APSInt objects, or objects that contain APSInt objects, into FoldingSets...
LLVM_NODISCARD size_t size() const
size - Get the string size.
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
Class for arbitrary precision integers.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned getMinSignedBits() const
Get the minimum bit size for this signed APInt.
StringRef - Represent a constant reference to a string, i.e.