17 EVT EVT::changeExtendedTypeToInteger()
const {
22 EVT EVT::changeExtendedVectorElementTypeToInteger()
const {
28 EVT EVT::getExtendedIntegerVT(
LLVMContext &Context,
unsigned BitWidth) {
36 unsigned NumElements) {
43 bool EVT::isExtendedFloatingPoint()
const {
48 bool EVT::isExtendedInteger()
const {
53 bool EVT::isExtendedScalarInteger()
const {
58 bool EVT::isExtendedVector()
const {
63 bool EVT::isExtended16BitVector()
const {
64 return isExtendedVector() && getExtendedSizeInBits() == 16;
67 bool EVT::isExtended32BitVector()
const {
68 return isExtendedVector() && getExtendedSizeInBits() == 32;
71 bool EVT::isExtended64BitVector()
const {
72 return isExtendedVector() && getExtendedSizeInBits() == 64;
75 bool EVT::isExtended128BitVector()
const {
76 return isExtendedVector() && getExtendedSizeInBits() == 128;
79 bool EVT::isExtended256BitVector()
const {
80 return isExtendedVector() && getExtendedSizeInBits() == 256;
83 bool EVT::isExtended512BitVector()
const {
84 return isExtendedVector() && getExtendedSizeInBits() == 512;
87 bool EVT::isExtended1024BitVector()
const {
88 return isExtendedVector() && getExtendedSizeInBits() == 1024;
91 bool EVT::isExtended2048BitVector()
const {
92 return isExtendedVector() && getExtendedSizeInBits() == 2048;
95 EVT EVT::getExtendedVectorElementType()
const {
97 return EVT::getEVT(cast<VectorType>(LLVMTy)->getElementType());
100 unsigned EVT::getExtendedVectorNumElements()
const {
102 return cast<VectorType>(LLVMTy)->getNumElements();
105 unsigned EVT::getExtendedSizeInBits()
const {
107 if (
IntegerType *ITy = dyn_cast<IntegerType>(LLVMTy))
108 return ITy->getBitWidth();
109 if (
VectorType *VTy = dyn_cast<VectorType>(LLVMTy))
110 return VTy->getBitWidth();
static unsigned getBitWidth(Type *Ty, const DataLayout &DL)
Returns the bitwidth of the given scalar or pointer type.
static Type * getDoubleTy(LLVMContext &C)
static IntegerType * getInt1Ty(LLVMContext &C)
This class represents lattice values for constants.
2: 32-bit floating point type
bool isInteger() const
Return true if this is an integer or a vector integer type.
4: 80-bit floating point type (X87)
1: 16-bit floating point type
static IntegerType * getInt64Ty(LLVMContext &C)
static Type * getMetadataTy(LLVMContext &C)
bool isVectorTy() const
True if this is an instance of VectorType.
static IntegerType * getInt16Ty(LLVMContext &C)
static Type * getX86_MMXTy(LLVMContext &C)
static Type * getX86_FP80Ty(LLVMContext &C)
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
static Type * getFloatTy(LLVMContext &C)
TypeID getTypeID() const
Return the type id for the type.
Type * getTypeForEVT(LLVMContext &Context) const
This method returns an LLVM type corresponding to the specified EVT.
bool isIntegerTy() const
True if this is an instance of IntegerType.
uint64_t getNumElements() const
static Type * getPPC_FP128Ty(LLVMContext &C)
unsigned getScalarSizeInBits() const
unsigned getSizeInBits() const
Return the size of the specified value type in bits.
bool isIntOrIntVectorTy() const
Return true if this is an integer type or a vector of integer types.
11: Arbitrary bit width integers
static IntegerType * getInt128Ty(LLVMContext &C)
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.
unsigned getVectorNumElements() const
Given a vector type, return the number of elements it contains.
static Type * getVoidTy(LLVMContext &C)
6: 128-bit floating point type (two 64-bits, PowerPC)
std::string getEVTString() const
This function returns value type as a string, e.g. "i32".
Class to represent integer types.
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
#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
EVT getVectorElementType() const
Given a vector type, return the type of each element.
std::string utostr(uint64_t X, bool isNeg=false)
Class to represent vector types.
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...
bool isVector() const
Return true if this is a vector value type.
static IntegerType * getInt32Ty(LLVMContext &C)
static EVT getEVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
bool isFPOrFPVectorTy() const
Return true if this is a FP type or a vector of FP.
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.
Type * getElementType() const
9: MMX vectors (64 bits, X86 specific)
static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth)
Returns the EVT that represents an integer with the given number of bits.
static IntegerType * getInt8Ty(LLVMContext &C)
bool isExtended() const
Test if the given EVT is extended (as opposed to being simple).
5: 128-bit floating point type (112-bit mantissa)