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