9#ifndef LLVM_IR_VECTORTYPEUTILS_H
10#define LLVM_IR_VECTORTYPEUTILS_H
21 if (Scalar->isVoidTy() || Scalar->isMetadataTy() || EC.isScalar())
56 if (
StructType *StructTy = dyn_cast<StructType>(Ty))
66 if (
StructType *StructTy = dyn_cast<StructType>(Ty))
74 if (
StructType *StructTy = dyn_cast<StructType>(Ty))
86 if (
StructType *StructTy = dyn_cast<StructType>(Ty))
94 if (
auto *StructTy = dyn_cast<StructType>(Ty))
95 return StructTy->elements();
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
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 LLVM_ABI VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
static LLVM_ABI 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.
LLVM_ABI 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.
LLVM_ABI 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.
LLVM_ABI Type * toScalarizedStructTy(StructType *StructTy)
A helper for converting structs of vector types to structs of scalar types.
LLVM_ABI bool isVectorizedStructTy(StructType *StructTy)
Returns true if StructTy is an unpacked literal struct where all elements are vectors of matching ele...