41 case VoidTyID :
return getVoidTy(
C);
42 case HalfTyID :
return getHalfTy(
C);
43 case BFloatTyID :
return getBFloatTy(
C);
46 case X86_FP80TyID :
return getX86_FP80Ty(
C);
47 case FP128TyID :
return getFP128Ty(
C);
48 case PPC_FP128TyID :
return getPPC_FP128Ty(
C);
49 case LabelTyID :
return getLabelTy(
C);
50 case MetadataTyID :
return getMetadataTy(
C);
51 case X86_AMXTyID :
return getX86_AMXTy(
C);
52 case TokenTyID :
return getTokenTy(
C);
58bool Type::isIntegerTy(
unsigned Bitwidth)
const {
59 return isIntegerTy() && cast<IntegerType>(
this)->getBitWidth() == Bitwidth;
63 if (
const auto *ATy = dyn_cast<ArrayType>(
this))
64 return ATy->getElementType()->isScalableTy(Visited);
65 if (
const auto *STy = dyn_cast<StructType>(
this))
66 return STy->isScalableTy(Visited);
67 return getTypeID() == ScalableVectorTyID || isScalableTargetExtTy();
70bool Type::isScalableTy()
const {
72 return isScalableTy(Visited);
75bool Type::containsNonGlobalTargetExtType(
77 if (
const auto *ATy = dyn_cast<ArrayType>(
this))
78 return ATy->getElementType()->containsNonGlobalTargetExtType(Visited);
79 if (
const auto *STy = dyn_cast<StructType>(
this))
80 return STy->containsNonGlobalTargetExtType(Visited);
81 if (
auto *TT = dyn_cast<TargetExtType>(
this))
82 return !
TT->hasProperty(TargetExtType::CanBeGlobal);
86bool Type::containsNonGlobalTargetExtType()
const {
88 return containsNonGlobalTargetExtType(Visited);
91bool Type::containsNonLocalTargetExtType(
93 if (
const auto *ATy = dyn_cast<ArrayType>(
this))
94 return ATy->getElementType()->containsNonLocalTargetExtType(Visited);
95 if (
const auto *STy = dyn_cast<StructType>(
this))
96 return STy->containsNonLocalTargetExtType(Visited);
97 if (
auto *TT = dyn_cast<TargetExtType>(
this))
98 return !
TT->hasProperty(TargetExtType::CanBeLocal);
102bool Type::containsNonLocalTargetExtType()
const {
104 return containsNonLocalTargetExtType(Visited);
109 case HalfTyID:
return APFloat::IEEEhalf();
110 case BFloatTyID:
return APFloat::BFloat();
111 case FloatTyID:
return APFloat::IEEEsingle();
112 case DoubleTyID:
return APFloat::IEEEdouble();
113 case X86_FP80TyID:
return APFloat::x87DoubleExtended();
114 case FP128TyID:
return APFloat::IEEEquad();
115 case PPC_FP128TyID:
return APFloat::PPCDoubleDouble();
120bool Type::isScalableTargetExtTy()
const {
121 if (
auto *TT = dyn_cast<TargetExtType>(
this))
122 return isa<ScalableVectorType>(
TT->getLayoutType());
128 if (&S == &APFloat::IEEEhalf())
129 Ty = Type::getHalfTy(
C);
130 else if (&S == &APFloat::BFloat())
131 Ty = Type::getBFloatTy(
C);
132 else if (&S == &APFloat::IEEEsingle())
133 Ty = Type::getFloatTy(
C);
134 else if (&S == &APFloat::IEEEdouble())
135 Ty = Type::getDoubleTy(
C);
136 else if (&S == &APFloat::x87DoubleExtended())
137 Ty = Type::getX86_FP80Ty(
C);
138 else if (&S == &APFloat::IEEEquad())
139 Ty = Type::getFP128Ty(
C);
141 assert(&S == &APFloat::PPCDoubleDouble() &&
"Unknown FP format");
142 Ty = Type::getPPC_FP128Ty(
C);
147bool Type::isRISCVVectorTupleTy()
const {
148 if (!isTargetExtTy())
151 return cast<TargetExtType>(
this)->getName() ==
"riscv.vector.tuple";
154bool Type::canLosslesslyBitCastTo(
Type *Ty)
const {
165 if (isa<VectorType>(
this) && isa<VectorType>(Ty))
169 if (((isa<FixedVectorType>(
this)) && Ty->
isX86_AMXTy()) &&
170 getPrimitiveSizeInBits().getFixedValue() == 8192)
172 if ((isX86_AMXTy() && isa<FixedVectorType>(Ty)) &&
181bool Type::isEmptyTy()
const {
182 if (
auto *ATy = dyn_cast<ArrayType>(
this)) {
183 unsigned NumElements = ATy->getNumElements();
184 return NumElements == 0 || ATy->getElementType()->isEmptyTy();
187 if (
auto *STy = dyn_cast<StructType>(
this)) {
188 unsigned NumElements = STy->getNumElements();
189 for (
unsigned i = 0; i < NumElements; ++i)
190 if (!STy->getElementType(i)->isEmptyTy())
198TypeSize Type::getPrimitiveSizeInBits()
const {
201 return TypeSize::getFixed(16);
202 case Type::BFloatTyID:
203 return TypeSize::getFixed(16);
204 case Type::FloatTyID:
205 return TypeSize::getFixed(32);
206 case Type::DoubleTyID:
207 return TypeSize::getFixed(64);
208 case Type::X86_FP80TyID:
209 return TypeSize::getFixed(80);
210 case Type::FP128TyID:
211 return TypeSize::getFixed(128);
212 case Type::PPC_FP128TyID:
213 return TypeSize::getFixed(128);
214 case Type::X86_AMXTyID:
215 return TypeSize::getFixed(8192);
216 case Type::IntegerTyID:
217 return TypeSize::getFixed(cast<IntegerType>(
this)->
getBitWidth());
218 case Type::FixedVectorTyID:
219 case Type::ScalableVectorTyID: {
220 const VectorType *VTy = cast<VectorType>(
this);
222 TypeSize ETS = VTy->getElementType()->getPrimitiveSizeInBits();
223 assert(!ETS.
isScalable() &&
"Vector type should have fixed-width elements");
227 return TypeSize::getFixed(0);
231unsigned Type::getScalarSizeInBits()
const {
233 return getScalarType()->getPrimitiveSizeInBits().getFixedValue();
236int Type::getFPMantissaWidth()
const {
237 if (
auto *VTy = dyn_cast<VectorType>(
this))
238 return VTy->getElementType()->getFPMantissaWidth();
239 assert(isFloatingPointTy() &&
"Not a floating point type!");
244 if (
getTypeID() == X86_FP80TyID)
return 64;
245 if (
getTypeID() == FP128TyID)
return 113;
250bool Type::isFirstClassType()
const {
258 auto *
ST = cast<StructType>(
this);
259 return !
ST->isOpaque();
265 if (
auto *ATy = dyn_cast<ArrayType>(
this))
266 return ATy->getElementType()->isSized(Visited);
268 if (
auto *VTy = dyn_cast<VectorType>(
this))
269 return VTy->getElementType()->isSized(Visited);
271 if (
auto *TTy = dyn_cast<TargetExtType>(
this))
272 return TTy->getLayoutType()->isSized(Visited);
274 return cast<StructType>(
this)->isSized(Visited);
302 return IntegerType::get(
C,
N);
307 return PointerType::get(
C, 10);
312 return PointerType::get(
C, 20);
320 assert(NumBits >= MIN_INT_BITS &&
"bitwidth too small");
321 assert(NumBits <= MAX_INT_BITS &&
"bitwidth too large");
325 case 1:
return Type::getInt1Ty(
C);
326 case 8:
return Type::getInt8Ty(
C);
327 case 16:
return Type::getInt16Ty(
C);
328 case 32:
return Type::getInt32Ty(
C);
329 case 64:
return Type::getInt64Ty(
C);
330 case 128:
return Type::getInt128Ty(
C);
343APInt IntegerType::getMask()
const {
return APInt::getAllOnes(
getBitWidth()); }
352 Type **SubTys =
reinterpret_cast<Type**
>(
this+1);
353 assert(isValidReturnType(Result) &&
"invalid return type for function");
354 setSubclassData(IsVarArgs);
358 for (
unsigned i = 0, e = Params.
size(); i != e; ++i) {
359 assert(isValidArgumentType(Params[i]) &&
360 "Not a valid type for function argument!");
361 SubTys[i+1] = Params[i];
364 ContainedTys = SubTys;
365 NumContainedTys = Params.
size() + 1;
380 if (Insertion.second) {
387 *Insertion.first = FT;
390 FT = *Insertion.first;
396 return get(Result, {}, isVarArg);
399bool FunctionType::isValidReturnType(
Type *
RetTy) {
400 return !
RetTy->isFunctionTy() && !
RetTy->isLabelTy() &&
401 !
RetTy->isMetadataTy();
404bool FunctionType::isValidArgumentType(
Type *ArgTy) {
426 if (Insertion.second) {
430 ST->setSubclassData(SCDB_IsLiteral);
431 ST->setBody(ETypes, isPacked);
432 *Insertion.first =
ST;
435 ST = *Insertion.first;
442 if ((getSubclassData() & SCDB_ContainsScalableVector) != 0)
445 if ((getSubclassData() & SCDB_NotContainsScalableVector) != 0)
448 if (!Visited.
insert(
this).second)
451 for (
Type *Ty : elements()) {
453 const_cast<StructType *
>(
this)->setSubclassData(
454 getSubclassData() | SCDB_ContainsScalableVector);
464 getSubclassData() | SCDB_NotContainsScalableVector);
468bool StructType::containsNonGlobalTargetExtType(
470 if ((getSubclassData() & SCDB_ContainsNonGlobalTargetExtType) != 0)
473 if ((getSubclassData() & SCDB_NotContainsNonGlobalTargetExtType) != 0)
476 if (!Visited.
insert(
this).second)
479 for (
Type *Ty : elements()) {
481 const_cast<StructType *
>(
this)->setSubclassData(
482 getSubclassData() | SCDB_ContainsNonGlobalTargetExtType);
492 getSubclassData() | SCDB_NotContainsNonGlobalTargetExtType);
496bool StructType::containsNonLocalTargetExtType(
498 if ((getSubclassData() & SCDB_ContainsNonLocalTargetExtType) != 0)
501 if ((getSubclassData() & SCDB_NotContainsNonLocalTargetExtType) != 0)
504 if (!Visited.
insert(
this).second)
507 for (
Type *Ty : elements()) {
509 const_cast<StructType *
>(
this)->setSubclassData(
510 getSubclassData() | SCDB_ContainsNonLocalTargetExtType);
520 getSubclassData() | SCDB_NotContainsNonLocalTargetExtType);
524bool StructType::containsHomogeneousScalableVectorTypes()
const {
525 if (
getNumElements() <= 0 || !isa<ScalableVectorType>(elements().front()))
527 return containsHomogeneousTypes();
530bool StructType::containsHomogeneousTypes()
const {
536 cantFail(setBodyOrError(Elements, isPacked));
540 assert(isOpaque() &&
"Struct body already set!");
542 if (
auto E = checkBody(Elements))
545 setSubclassData(getSubclassData() | SCDB_HasBody);
547 setSubclassData(getSubclassData() | SCDB_Packed);
554 return Error::success();
559 for (
unsigned I = 0;
I < Worklist.size(); ++
I) {
560 Type *Ty = Worklist[
I];
564 Worklist.insert_range(Ty->
subtypes());
566 return Error::success();
593 getContext().pImpl->NamedStructTypes.insert(std::make_pair(
Name,
this));
596 if (!IterBool.second) {
598 TempStr.push_back(
'.');
603 TempStr.resize(NameSize + 1);
604 TmpStream << getContext().pImpl->NamedStructTypesUniqueID++;
606 IterBool = getContext().pImpl->NamedStructTypes.insert(
607 std::make_pair(TmpStream.str(),
this));
608 }
while (!IterBool.second);
628 return get(Context, {}, isPacked);
634 ST->setBody(Elements, isPacked);
639 return create(Context, Elements,
StringRef());
649 "This method may not be invoked with an empty list");
650 return create(Elements[0]->getContext(), Elements,
Name, isPacked);
655 "This method may not be invoked with an empty list");
656 return create(Elements[0]->getContext(), Elements,
StringRef());
660 if ((getSubclassData() & SCDB_IsSized) != 0)
673 if (containsHomogeneousScalableVectorTypes()) {
674 const_cast<StructType *
>(
this)->setSubclassData(getSubclassData() |
678 for (
Type *Ty : elements()) {
692 const_cast<StructType*
>(
this)->setSubclassData(
693 getSubclassData() | SCDB_IsSized);
698 assert(!isLiteral() &&
"Literal structs never have names");
704bool StructType::isValidElementType(
Type *ElemTy) {
711 if (
this ==
Other)
return true;
713 if (isPacked() !=
Other->isPacked())
716 return elements() ==
Other->elements();
719Type *StructType::getTypeAtIndex(
const Value *V)
const {
720 unsigned Idx = (
unsigned)cast<Constant>(V)->getUniqueInteger().getZExtValue();
721 assert(indexValid(
Idx) &&
"Invalid structure index!");
722 return getElementType(
Idx);
725bool StructType::indexValid(
const Value *V)
const {
728 if (!
V->getType()->isIntOrIntVectorTy(32))
730 if (isa<ScalableVectorType>(
V->getType()))
732 const Constant *
C = dyn_cast<Constant>(V);
733 if (
C &&
V->getType()->isVectorTy())
734 C =
C->getSplatValue();
740 return C.pImpl->NamedStructTypes.lookup(
Name);
748 :
Type(ElType->getContext(), ArrayTyID), ContainedType(ElType),
750 ContainedTys = &ContainedType;
759 pImpl->
ArrayTypes[std::make_pair(ElementType, NumElements)];
766bool ArrayType::isValidElementType(
Type *ElemTy) {
777 :
Type(ElType->getContext(), TID), ContainedType(ElType),
778 ElementQuantity(
EQ) {
779 ContainedTys = &ContainedType;
785 return ScalableVectorType::get(ElementType,
EC.getKnownMinValue());
787 return FixedVectorType::get(ElementType,
EC.getKnownMinValue());
790bool VectorType::isValidElementType(
Type *ElemTy) {
794 if (
auto *TTy = dyn_cast<TargetExtType>(ElemTy))
795 return TTy->hasProperty(TargetExtType::CanBeVectorElement);
804 assert(NumElts > 0 &&
"#Elements of a VectorType must be greater than 0");
806 "be an integer, floating point, "
807 "pointer type, or a valid target "
810 auto EC = ElementCount::getFixed(NumElts);
814 .pImpl->VectorTypes[std::make_pair(ElementType, EC)];
818 return cast<FixedVectorType>(Entry);
826 unsigned MinNumElts) {
827 assert(MinNumElts > 0 &&
"#Elements of a VectorType must be greater than 0");
829 "be an integer, floating point, or "
832 auto EC = ElementCount::getScalable(MinNumElts);
836 .pImpl->VectorTypes[std::make_pair(ElementType, EC)];
840 return cast<ScalableVectorType>(Entry);
848 assert(EltTy &&
"Can't get a pointer to <null> type!");
868 :
Type(
C, PointerTyID) {
869 setSubclassData(AddrSpace);
872PointerType *Type::getPointerTo(
unsigned AddrSpace)
const {
873 return PointerType::get(getContext(), AddrSpace);
876bool PointerType::isValidElementType(
Type *ElemTy) {
882bool PointerType::isLoadableOrStorableType(
Type *ElemTy) {
893 NumContainedTys =
Types.size();
896 Type **Params =
reinterpret_cast<Type **
>(
this + 1);
897 ContainedTys = Params;
898 for (
Type *
T : Types)
901 setSubclassData(Ints.
size());
902 unsigned *IntParamSpace =
reinterpret_cast<unsigned *
>(Params);
903 IntParams = IntParamSpace;
904 for (
unsigned IntParam : Ints)
905 *IntParamSpace++ = IntParam;
925 auto [Iter,
Inserted] =
C.pImpl->TargetExtTypes.insert_as(
nullptr, Key);
935 return checkParams(TT);
944 if (TTy->Name ==
"aarch64.svcount" &&
947 "target extension type aarch64.svcount should have no parameters");
950 if (TTy->Name ==
"riscv.vector.tuple" &&
953 "target extension type riscv.vector.tuple should have one "
954 "type parameter and one integer parameter");
957 if (TTy->Name ==
"amdgcn.named.barrier" &&
960 "should have no type parameters "
961 "and one integer parameter");
968struct TargetTypeInfo {
972 template <
typename... ArgTys>
973 TargetTypeInfo(
Type *LayoutType, ArgTys... Properties)
974 : LayoutType(LayoutType), Properties((0 | ... | Properties)) {
975 assert((!(this->Properties & TargetExtType::CanBeVectorElement) ||
977 "Vector element type must be sized");
985 if (
Name ==
"spirv.Image" ||
Name ==
"spirv.SignedImage")
986 return TargetTypeInfo(PointerType::get(
C, 0), TargetExtType::CanBeGlobal,
987 TargetExtType::CanBeLocal);
988 if (
Name ==
"spirv.Type") {
990 "Wrong number of parameters for spirv.Type");
996 if (
Size > 0 && Alignment > 0) {
998 ArrayType::get(Type::getIntNTy(
C, Alignment),
Size * 8 / Alignment);
1003 LayoutType = Type::getInt32Ty(
C);
1006 return TargetTypeInfo(LayoutType, TargetExtType::CanBeGlobal,
1007 TargetExtType::CanBeLocal);
1009 if (
Name ==
"spirv.IntegralConstant" ||
Name ==
"spirv.Literal")
1010 return TargetTypeInfo(Type::getVoidTy(
C));
1011 if (
Name.starts_with(
"spirv."))
1012 return TargetTypeInfo(PointerType::get(
C, 0), TargetExtType::HasZeroInit,
1013 TargetExtType::CanBeGlobal,
1014 TargetExtType::CanBeLocal);
1017 if (
Name ==
"aarch64.svcount")
1018 return TargetTypeInfo(ScalableVectorType::get(Type::getInt1Ty(
C), 16),
1019 TargetExtType::HasZeroInit,
1020 TargetExtType::CanBeLocal);
1025 if (
Name ==
"riscv.vector.tuple") {
1026 unsigned TotalNumElts =
1028 ->getMinNumElements(),
1029 RISCV::RVVBytesPerBlock) *
1031 return TargetTypeInfo(
1032 ScalableVectorType::get(Type::getInt8Ty(
C), TotalNumElts),
1033 TargetExtType::CanBeLocal, TargetExtType::HasZeroInit);
1037 if (
Name.starts_with(
"dx."))
1038 return TargetTypeInfo(PointerType::get(
C, 0), TargetExtType::CanBeGlobal,
1039 TargetExtType::CanBeLocal,
1040 TargetExtType::IsTokenLike);
1043 if (
Name ==
"amdgcn.named.barrier") {
1044 return TargetTypeInfo(FixedVectorType::get(Type::getInt32Ty(
C), 4),
1045 TargetExtType::CanBeGlobal);
1050 if (
Name ==
"llvm.test.vectorelement") {
1051 return TargetTypeInfo(Type::getInt32Ty(
C), TargetExtType::CanBeLocal,
1052 TargetExtType::CanBeVectorElement);
1055 return TargetTypeInfo(Type::getVoidTy(
C));
1058bool Type::isTokenLikeTy()
const {
1061 if (
auto *TT = dyn_cast<TargetExtType>(
this))
1062 return TT->hasProperty(TargetExtType::Property::IsTokenLike);
1066Type *TargetExtType::getLayoutType()
const {
1070bool TargetExtType::hasProperty(Property Prop)
const {
1072 return (Properties & Prop) == Prop;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the StringMap class.
This file implements a class to represent arbitrary precision integral constant values and operations...
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
std::optional< std::vector< StOtherPiece > > Other
static char getTypeID(Type *Ty)
const Type::TypeID FloatTyID
const Type::TypeID DoubleTyID
static StringRef getName(Value *V)
static unsigned getNumElements(Type *Ty)
static bool isValidElementType(Type *Ty)
Predicate for the element types that the SLP vectorizer supports.
static TargetTypeInfo getTargetTypeInfo(const TargetExtType *Ty)
This file implements a set that has insertion order iteration characteristics.
This file defines the SmallString class.
static unsigned getBitWidth(Type *Ty, const DataLayout &DL)
Returns the bitwidth of the given scalar or pointer type.
ArrayType(const Node *Base_, Node *Dimension_)
FunctionType(const Node *Ret_, NodeArray Params_, Qualifiers CVQuals_, FunctionRefQual RefQual_, const Node *ExceptionSpec_)
PointerType(const Node *Pointee_)
VectorType(const Node *BaseType_, const Node *Dimension_)
Class for arbitrary precision integers.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
bool empty() const
empty - Check if the array is empty.
LLVM_ATTRIBUTE_RETURNS_NONNULL void * Allocate(size_t Size, Align Alignment)
Allocate space at the specified alignment.
This is the shared class of boolean and integer constants.
This is an important base class in LLVM.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Class to represent fixed width SIMD vectors.
Class to represent integer types.
StructTypeSet AnonStructTypes
DenseMap< std::pair< Type *, uint64_t >, ArrayType * > ArrayTypes
DenseMap< unsigned, PointerType * > PointerTypes
PointerType * AS0PointerType
FunctionTypeSet FunctionTypes
This is an important class for using LLVM in a threaded context.
Class to represent scalable SIMD vectors.
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
A SetVector that performs no allocations if smaller than a certain size.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
void remove(MapEntryTy *KeyValue)
remove - Remove the specified key/value pair from the map, but do not erase it.
StringRef - Represent a constant reference to a string, i.e.
Class to represent struct types.
Symbol info for RuntimeDyld.
Class to represent target extensions types, which are generally unintrospectable from target-independ...
unsigned getNumIntParameters() const
Type * getTypeParameter(unsigned i) const
unsigned getNumTypeParameters() const
unsigned getIntParameter(unsigned i) const
StringRef getName() const
Return the name for this target extension type.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM_ABI TypeSize getPrimitiveSizeInBits() const LLVM_READONLY
Return the basic size of this type if it is a primitive type.
bool isLabelTy() const
Return true if this is 'label'.
bool isPointerTy() const
True if this is an instance of PointerType.
LLVM_ABI bool isFirstClassType() const
Return true if the type is "first class", meaning it is a valid type for a Value.
LLVM_ABI bool containsNonGlobalTargetExtType(SmallPtrSetImpl< const Type * > &Visited) const
Return true if this type is or contains a target extension type that disallows being used as a global...
TypeID
Definitions of all of the base types for the Type system.
ArrayRef< Type * > subtypes() const
LLVM_ABI bool isScalableTy(SmallPtrSetImpl< const Type * > &Visited) const
Return true if this is a type whose size is a known multiple of vscale.
LLVM_ABI bool containsNonLocalTargetExtType(SmallPtrSetImpl< const Type * > &Visited) const
Return true if this type is or contains a target extension type that disallows being used as a local.
bool isSized(SmallPtrSetImpl< Type * > *Visited=nullptr) const
Return true if it makes sense to take the size of this type.
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
void setSubclassData(unsigned val)
bool isFloatingPointTy() const
Return true if this is one of the floating-point types.
bool isX86_AMXTy() const
Return true if this is X86 AMX.
bool isFunctionTy() const
True if this is an instance of FunctionType.
bool isIntegerTy() const
True if this is an instance of IntegerType.
TypeID getTypeID() const
Return the type id for the type.
bool isTokenTy() const
Return true if this is 'token'.
bool isVoidTy() const
Return true if this is 'void'.
bool isMetadataTy() const
Return true if this is 'metadata'.
LLVM Value Representation.
std::pair< iterator, bool > insert_as(const ValueT &V, const LookupKeyT &LookupKey)
Alternative version of insert that uses a different (and possibly less expensive) key type.
constexpr ScalarTy getFixedValue() const
constexpr bool isScalable() const
Returns whether the quantity is scaled by a runtime quantity (vscale).
A raw_ostream that writes to an SmallVector or SmallString.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
ElementType
The element type of an SRV or UAV resource.
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
bool all_equal(std::initializer_list< T > Values)
Returns true if all Values in the initializer lists are equal or the list.