22 EVT EVT::changeExtendedTypeToInteger()
const {
27 EVT EVT::changeExtendedVectorElementTypeToInteger()
const {
33 EVT EVT::getExtendedIntegerVT(
LLVMContext &Context,
unsigned BitWidth) {
41 unsigned NumElements) {
48 bool EVT::isExtendedFloatingPoint()
const {
53 bool EVT::isExtendedInteger()
const {
58 bool EVT::isExtendedScalarInteger()
const {
63 bool EVT::isExtendedVector()
const {
68 bool EVT::isExtended16BitVector()
const {
69 return isExtendedVector() && getExtendedSizeInBits() == 16;
72 bool EVT::isExtended32BitVector()
const {
73 return isExtendedVector() && getExtendedSizeInBits() == 32;
76 bool EVT::isExtended64BitVector()
const {
77 return isExtendedVector() && getExtendedSizeInBits() == 64;
80 bool EVT::isExtended128BitVector()
const {
81 return isExtendedVector() && getExtendedSizeInBits() == 128;
84 bool EVT::isExtended256BitVector()
const {
85 return isExtendedVector() && getExtendedSizeInBits() == 256;
88 bool EVT::isExtended512BitVector()
const {
89 return isExtendedVector() && getExtendedSizeInBits() == 512;
92 bool EVT::isExtended1024BitVector()
const {
93 return isExtendedVector() && getExtendedSizeInBits() == 1024;
96 bool EVT::isExtended2048BitVector()
const {
97 return isExtendedVector() && getExtendedSizeInBits() == 2048;
100 EVT EVT::getExtendedVectorElementType()
const {
102 return EVT::getEVT(cast<VectorType>(LLVMTy)->getElementType());
105 unsigned EVT::getExtendedVectorNumElements()
const {
107 return cast<VectorType>(LLVMTy)->getNumElements();
110 unsigned EVT::getExtendedSizeInBits()
const {
112 if (
IntegerType *ITy = dyn_cast<IntegerType>(LLVMTy))
113 return ITy->getBitWidth();
114 if (
VectorType *VTy = dyn_cast<VectorType>(LLVMTy))
115 return VTy->getBitWidth();
static unsigned getBitWidth(Type *Ty, const DataLayout &DL)
Returns the bitwidth of the given scalar or pointer type (if unknown returns 0).
static MVT getIntegerVT(unsigned BitWidth)
static Type * getDoubleTy(LLVMContext &C)
static IntegerType * getInt1Ty(LLVMContext &C)
static MVT getVectorVT(MVT VT, unsigned NumElements)
2: 32-bit floating point type
bool isExtended() const
isExtended - Test if the given EVT is extended (as opposed to being simple).
Type * getTypeForEVT(LLVMContext &Context) const
getTypeForEVT - This method returns an LLVM type corresponding to the specified EVT.
4: 80-bit floating point type (X87)
1: 16-bit floating point type
static IntegerType * getInt64Ty(LLVMContext &C)
static Type * getMetadataTy(LLVMContext &C)
static IntegerType * getInt16Ty(LLVMContext &C)
static Type * getX86_MMXTy(LLVMContext &C)
static Type * getX86_FP80Ty(LLVMContext &C)
bool isVector() const
isVector - Return true if this is a vector value type.
std::string getEVTString() const
getEVTString - This function returns value type as a string, e.g.
static Type * getFloatTy(LLVMContext &C)
static Type * getPPC_FP128Ty(LLVMContext &C)
bool isInteger() const
isInteger - Return true if this is an integer, or a vector integer type.
EVT getVectorElementType() const
getVectorElementType - Given a vector type, return the type of each element.
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
static std::string utostr(uint64_t X, bool isNeg=false)
TypeID getTypeID() const
Return the type id for the type.
Type * getElementType() const
11: Arbitrary bit width integers
unsigned getScalarSizeInBits() const
bool isIntOrIntVectorTy() const
Return true if this is an integer type or a vector of integer types.
static IntegerType * getInt128Ty(LLVMContext &C)
MVT - Machine Value Type.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
bool isVectorTy() const
True if this is an instance of VectorType.
static Type * getVoidTy(LLVMContext &C)
uint64_t getNumElements() const
6: 128-bit floating point type (two 64-bits, PowerPC)
Class to represent integer types.
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
EVT - Extended Value Type.
bool isFPOrFPVectorTy() const
Return true if this is a FP type or a vector of FP.
static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements)
getVectorVT - Returns the EVT that represents a vector NumElements in length, where each element is o...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static Type * getFP128Ty(LLVMContext &C)
static Type * getHalfTy(LLVMContext &C)
static IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
16: SIMD 'packed' format, or other vector type
Class to represent vector types.
bool isIntegerTy() const
True if this is an instance of IntegerType.
static IntegerType * getInt32Ty(LLVMContext &C)
unsigned getSizeInBits() const
getSizeInBits - Return the size of the specified value type in bits.
static EVT getEVT(Type *Ty, bool HandleUnknown=false)
getEVT - Return the value type corresponding to the specified type.
3: 64-bit floating point type
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static VectorType * get(Type *ElementType, unsigned NumElements)
This static method is the primary way to construct an VectorType.
9: MMX vectors (64 bits, X86 specific)
static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth)
getIntegerVT - Returns the EVT that represents an integer with the given number of bits...
static IntegerType * getInt8Ty(LLVMContext &C)
5: 128-bit floating point type (112-bit mantissa)
unsigned getVectorNumElements() const
getVectorNumElements - Given a vector type, return the number of elements it contains.