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));
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.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
APSInt()
Default constructor that creates an uninitialized APInt.
APInt trunc(unsigned width) const
Truncate to new width.
void AddInteger(signed I)
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 LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
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.