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();
183 assert(
isExtended() &&
"Type is not extended!");
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
Type * getTypeForEVT(LLVMContext &Context) const
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.
static unsigned getBitWidth(Type *Ty, const DataLayout *TD)
std::string getEVTString() const
getEVTString - This function returns value type as a string, e.g. "i32".
static Type * getFloatTy(LLVMContext &C)
#define llvm_unreachable(msg)
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
LLVMContext & getContext() const
getContext - Return the LLVMContext in which this type was uniqued.
static std::string utostr(uint64_t X, bool isNeg=false)
unsigned getNumElements() const
Return the number of elements in the Vector type.
Type * getElementType() const
10: Arbitrary bit width integers
bool isIntOrIntVectorTy() const
static Type * getVoidTy(LLVMContext &C)
6: 128-bit floating point type (two 64-bits, PowerPC)
Integer representation type.
static MVT getVT(Type *Ty, bool HandleUnknown=false)
bool isFPOrFPVectorTy() const
static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements)
static Type * getFP128Ty(LLVMContext &C)
static Type * getHalfTy(LLVMContext &C)
static IntegerType * get(LLVMContext &C, unsigned NumBits)
Get or create an IntegerType instance.
15: SIMD 'packed' format, or other vector type
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)
3: 64-bit floating point type
static VectorType * get(Type *ElementType, unsigned NumElements)
9: MMX vectors (64 bits, X86 specific)
static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth)
static IntegerType * getInt8Ty(LLVMContext &C)
5: 128-bit floating point type (112-bit mantissa)
unsigned getVectorNumElements() const