22 EVT EVT::changeExtendedVectorElementTypeToInteger()
const {
28 EVT EVT::getExtendedIntegerVT(
LLVMContext &Context,
unsigned BitWidth) {
31 assert(VT.
isExtended() &&
"Type is not extended!");
36 unsigned NumElements) {
39 assert(ResultVT.
isExtended() &&
"Type is not extended!");
43 bool EVT::isExtendedFloatingPoint()
const {
44 assert(
isExtended() &&
"Type is not extended!");
48 bool EVT::isExtendedInteger()
const {
49 assert(
isExtended() &&
"Type is not extended!");
53 bool EVT::isExtendedVector()
const {
54 assert(
isExtended() &&
"Type is not extended!");
58 bool EVT::isExtended16BitVector()
const {
59 return isExtendedVector() && getExtendedSizeInBits() == 16;
62 bool EVT::isExtended32BitVector()
const {
63 return isExtendedVector() && getExtendedSizeInBits() == 32;
66 bool EVT::isExtended64BitVector()
const {
67 return isExtendedVector() && getExtendedSizeInBits() == 64;
70 bool EVT::isExtended128BitVector()
const {
71 return isExtendedVector() && getExtendedSizeInBits() == 128;
74 bool EVT::isExtended256BitVector()
const {
75 return isExtendedVector() && getExtendedSizeInBits() == 256;
78 bool EVT::isExtended512BitVector()
const {
79 return isExtendedVector() && getExtendedSizeInBits() == 512;
82 bool EVT::isExtended1024BitVector()
const {
83 return isExtendedVector() && getExtendedSizeInBits() == 1024;
86 EVT EVT::getExtendedVectorElementType()
const {
87 assert(
isExtended() &&
"Type is not extended!");
88 return EVT::getEVT(cast<VectorType>(LLVMTy)->getElementType());
91 unsigned EVT::getExtendedVectorNumElements()
const {
92 assert(
isExtended() &&
"Type is not extended!");
93 return cast<VectorType>(LLVMTy)->getNumElements();
96 unsigned EVT::getExtendedSizeInBits()
const {
97 assert(
isExtended() &&
"Type is not extended!");
98 if (
IntegerType *ITy = dyn_cast<IntegerType>(LLVMTy))
99 return ITy->getBitWidth();
100 if (
VectorType *VTy = dyn_cast<VectorType>(LLVMTy))
101 return VTy->getBitWidth();
184 assert(
isExtended() &&
"Type is not extended!");
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)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
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
getContext - Return the LLVMContext in which this type was uniqued.
static std::string utostr(uint64_t X, bool isNeg=false)
TypeID getTypeID() const
getTypeID - Return the type id for the type.
unsigned getNumElements() const
Return the number of elements in the Vector type.
Type * getElementType() const
10: Arbitrary bit width integers
bool isIntOrIntVectorTy() const
isIntOrIntVectorTy - 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
isVectorTy - True if this is an instance of VectorType.
static Type * getVoidTy(LLVMContext &C)
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
isFPOrFPVectorTy - 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...
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.
15: SIMD 'packed' format, or other vector type
VectorType - Class to represent vector types.
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
static VectorType * get(Type *ElementType, unsigned NumElements)
VectorType::get - 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.