Go to the documentation of this file.
18 EVT EVT::changeExtendedTypeToInteger()
const {
24 EVT EVT::changeExtendedVectorElementTypeToInteger()
const {
31 EVT EVT::changeExtendedVectorElementType(
EVT EltVT)
const {
60 bool EVT::isExtendedFloatingPoint()
const {
65 bool EVT::isExtendedInteger()
const {
70 bool EVT::isExtendedScalarInteger()
const {
75 bool EVT::isExtendedVector()
const {
80 bool EVT::isExtended16BitVector()
const {
81 return isExtendedVector() && getExtendedSizeInBits() == 16;
84 bool EVT::isExtended32BitVector()
const {
85 return isExtendedVector() && getExtendedSizeInBits() == 32;
88 bool EVT::isExtended64BitVector()
const {
89 return isExtendedVector() && getExtendedSizeInBits() == 64;
92 bool EVT::isExtended128BitVector()
const {
93 return isExtendedVector() && getExtendedSizeInBits() == 128;
96 bool EVT::isExtended256BitVector()
const {
97 return isExtendedVector() && getExtendedSizeInBits() == 256;
100 bool EVT::isExtended512BitVector()
const {
101 return isExtendedVector() && getExtendedSizeInBits() == 512;
104 bool EVT::isExtended1024BitVector()
const {
105 return isExtendedVector() && getExtendedSizeInBits() == 1024;
108 bool EVT::isExtended2048BitVector()
const {
109 return isExtendedVector() && getExtendedSizeInBits() == 2048;
112 bool EVT::isExtendedFixedLengthVector()
const {
113 return isExtendedVector() && isa<FixedVectorType>(LLVMTy);
116 bool EVT::isExtendedScalableVector()
const {
117 return isExtendedVector() && isa<ScalableVectorType>(LLVMTy);
120 EVT EVT::getExtendedVectorElementType()
const {
122 return EVT::getEVT(cast<VectorType>(LLVMTy)->getElementType());
125 unsigned EVT::getExtendedVectorNumElements()
const {
128 if (
EC.isScalable()) {
130 <<
"The code that requested the fixed number of elements has made the "
131 "assumption that this vector is not scalable. This assumption was "
132 "not correct, and this may lead to broken code\n";
134 return EC.getKnownMinValue();
137 ElementCount EVT::getExtendedVectorElementCount()
const {
139 return cast<VectorType>(LLVMTy)->getElementCount();
142 TypeSize EVT::getExtendedSizeInBits()
const {
144 if (
IntegerType *ITy = dyn_cast<IntegerType>(LLVMTy))
146 if (
VectorType *VTy = dyn_cast<VectorType>(LLVMTy))
147 return VTy->getPrimitiveSizeInBits();
@ FloatTyID
32-bit floating point type
@ DoubleTyID
64-bit floating point type
This is an optimization pass for GlobalISel generic memory operations.
static IntegerType * getInt1Ty(LLVMContext &C)
ElementCount getVectorElementCount() const
static Type * getFP128Ty(LLVMContext &C)
@ VoidTyID
type with no size
static PointerType * get(Type *ElementType, unsigned AddressSpace)
This constructs a pointer to an object of the specified type in a numbered address space.
@ X86_AMXTyID
AMX vectors (8192 bits, X86 specific)
TypeID getTypeID() const
Return the type id for the type.
bool isFPOrFPVectorTy() const
Return true if this is a FP type or a vector of FP.
bool isScalableVector() const
Return true if this is a vector type where the runtime length is machine dependent.
The instances of the Type class are immutable: once they are created, they are never changed.
static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements, bool IsScalable=false)
Returns the EVT that represents a vector NumElements in length, where each element is of type VT.
Type * getElementType() const
static unsigned getBitWidth(Type *Ty, const DataLayout &DL)
Returns the bitwidth of the given scalar or pointer type.
static StructType * create(LLVMContext &Context, StringRef Name)
This creates an identified struct.
static IntegerType * getInt8Ty(LLVMContext &C)
static IntegerType * getInt32Ty(LLVMContext &C)
static Type * getMetadataTy(LLVMContext &C)
static Type * getX86_AMXTy(LLVMContext &C)
static Type * getPPC_FP128Ty(LLVMContext &C)
static Type * getDoubleTy(LLVMContext &C)
bool isVectorTy() const
True if this is an instance of VectorType.
ElementCount getElementCount() const
Return an ElementCount instance to represent the (possibly scalable) number of elements in the vector...
static TypeSize Fixed(ScalarTy MinVal)
Class to represent integer types.
bool isInteger() const
Return true if this is an integer or a vector integer type.
static FixedVectorType * get(Type *ElementType, unsigned NumElts)
@ BFloatTyID
16-bit floating point type (7-bit significand)
Type * getTypeForEVT(LLVMContext &Context) const
This method returns an LLVM type corresponding to the specified EVT.
bool isExtended() const
Test if the given EVT is extended (as opposed to being simple).
bool isIntegerTy() const
True if this is an instance of IntegerType.
Base class of all SIMD vector types.
static raw_ostream & warning()
Convenience method for printing "warning: " to stderr.
TypeSize getSizeInBits() const
Return the size of the specified value type in bits.
@ X86_MMXTyID
MMX vectors (64 bits, X86 specific)
This is an important class for using LLVM in a threaded context.
static EVT getEVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth)
Returns the EVT that represents an integer with the given number of bits.
static Type * getX86_FP80Ty(LLVMContext &C)
static MVT getVectorVT(MVT VT, unsigned NumElements)
@ FP128TyID
128-bit floating point type (112-bit significand)
bool isVector() const
Return true if this is a vector value type.
@ PPC_FP128TyID
128-bit floating point type (two 64-bits, PowerPC)
uint64_t getScalarSizeInBits() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
static IntegerType * getInt128Ty(LLVMContext &C)
@ IntegerTyID
Arbitrary bit width integers.
std::string getEVTString() const
This function returns value type as a string, e.g. "i32".
static IntegerType * getInt64Ty(LLVMContext &C)
static IntegerType * getIntNTy(LLVMContext &C, unsigned N)
static Type * getHalfTy(LLVMContext &C)
@ FixedVectorTyID
Fixed width SIMD vector type.
bool isIntOrIntVectorTy() const
Return true if this is an integer type or a vector of integer types.
constexpr unsigned BitWidth
static Type * getBFloatTy(LLVMContext &C)
EVT getVectorElementType() const
Given a vector type, return the type of each element.
static Type * getVoidTy(LLVMContext &C)
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
static IntegerType * getInt16Ty(LLVMContext &C)
@ ScalableVectorTyID
Scalable SIMD vector type.
static IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
static ScalableVectorType * get(Type *ElementType, unsigned MinNumElts)
static Type * getX86_MMXTy(LLVMContext &C)
bool isFloatingPoint() const
Return true if this is a FP or a vector FP type.
static VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
@ HalfTyID
16-bit floating point type
@ X86_FP80TyID
80-bit floating point type (X87)
static Type * getFloatTy(LLVMContext &C)
static MVT getIntegerVT(unsigned BitWidth)