9#ifndef LLVM_IR_VECTORTYPEUTILS_H
10#define LLVM_IR_VECTORTYPEUTILS_H
20 if (Scalar->isVoidTy() || Scalar->isMetadataTy() || EC.isScalar())
55 if (
StructType *StructTy = dyn_cast<StructType>(Ty))
65 if (
StructType *StructTy = dyn_cast<StructType>(Ty))
73 if (
StructType *StructTy = dyn_cast<StructType>(Ty))
85 if (
StructType *StructTy = dyn_cast<StructType>(Ty))
93 if (
auto *StructTy = dyn_cast<StructType>(Ty))
94 return StructTy->elements();
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
static constexpr ElementCount getFixed(ScalarTy MinVal)
Class to represent struct types.
bool isLiteral() const
Return true if this type is uniqued by structural equivalence, false if it is a struct definition.
The instances of the Type class are immutable: once they are created, they are never changed.
bool isVectorTy() const
True if this is an instance of VectorType.
bool isVoidTy() const
Return true if this is 'void'.
Type * getScalarType() const
If this is a vector type, return the element type, otherwise return 'this'.
static VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
static bool isValidElementType(Type *ElemTy)
Return true if the specified type is valid as a element type.
This is an optimization pass for GlobalISel generic memory operations.
bool canVectorizeStructTy(StructType *StructTy)
Returns true if StructTy is an unpacked literal struct where all elements are scalars that can be use...
Type * toScalarizedTy(Type *Ty)
A helper for converting vectorized types to scalarized (non-vector) types.
bool isUnpackedStructLiteral(StructType *StructTy)
bool isVectorizedTy(Type *Ty)
Returns true if Ty is a vector type or a struct of vector types where all vector types share the same...
ElementCount getVectorizedTypeVF(Type *Ty)
Returns the number of vector elements for a vectorized type.
Type * toVectorizedStructTy(StructType *StructTy, ElementCount EC)
A helper for converting structs of scalar types to structs of vector types.
Type * toVectorizedTy(Type *Ty, ElementCount EC)
A helper for converting to vectorized types.
bool canVectorizeTy(Type *Ty)
Returns true if Ty is a valid vector element type, void, or an unpacked literal struct where all elem...
ArrayRef< Type * > getContainedTypes(Type *const &Ty)
Returns the types contained in Ty.
Type * toVectorTy(Type *Scalar, ElementCount EC)
A helper function for converting Scalar types to vector types.
Type * toScalarizedStructTy(StructType *StructTy)
A helper for converting structs of vector types to structs of scalar types.
bool isVectorizedStructTy(StructType *StructTy)
Returns true if StructTy is an unpacked literal struct where all elements are vectors of matching ele...