22 assert(!Str.empty() &&
"Invalid string length");
25 unsigned NumBits = ((Str.size() * 64) / 19) + 2;
26 APInt Tmp(NumBits, Str, 10);
29 if (MinBits < NumBits)
30 Tmp = Tmp.
trunc(std::max<unsigned>(1, MinBits));
31 *
this =
APSInt(Tmp,
false);
35 if (ActiveBits < NumBits)
36 Tmp = Tmp.
trunc(std::max<unsigned>(1, ActiveBits));
41 ID.AddInteger((
unsigned) (IsUnsigned ? 1 : 0));
This file implements the APSInt class, which is a simple class that represents an arbitrary sized int...
This file defines a hash set that can be used to remove duplication of nodes in a graph.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Class for arbitrary precision integers.
unsigned getActiveBits() const
Compute the number of active bits in the value.
APInt trunc(unsigned width) const
Truncate to new width.
unsigned getSignificantBits() const
Get the minimum bit size for this signed APInt.
void Profile(FoldingSetNodeID &id) const
Used to insert APInt objects, or objects that contain APInt objects, into FoldingSets.
void Profile(FoldingSetNodeID &ID) const
Used to insert APSInt objects, or objects that contain APSInt objects, into FoldingSets.
APSInt()=default
Default constructor that creates an uninitialized APInt.
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.