16 #ifndef LLVM_CODEGEN_VALUETYPES_H
17 #define LLVM_CODEGEN_VALUETYPES_H
19 #include "llvm/Support/DataTypes.h"
243 return !(NElts & (NElts - 1));
319 case v64i8:
return 64;
333 case v8f64:
return 8;
341 case v4f64:
return 4;
349 case v2f64:
return 2;
355 case v1f64:
return 1;
384 case v1i16:
return 16;
392 case v1i32:
return 32;
403 case v1f64:
return 64;
404 case f80 :
return 80;
414 case v2f64:
return 128;
420 case v4f64:
return 256;
426 case v8f64:
return 512;
582 EVT() : V((
MVT::SimpleValueType)(
MVT::INVALID_SIMPLE_VALUE_TYPE)),
588 return !(*
this != VT);
594 return LLVMTy != VT.LLVMTy;
611 return getExtendedIntegerVT(Context, BitWidth);
620 return getExtendedVectorVT(Context, VT, NumElements);
628 return changeExtendedVectorElementTypeToInteger();
634 "Simple vector VT not representable by simple integer vector VT!");
713 return BitSize >= 8 && !(BitSize & (BitSize - 1));
718 if (EVT::operator==(VT))
return true;
724 if (EVT::operator==(VT))
return false;
730 if (EVT::operator==(VT))
return true;
736 if (EVT::operator==(VT))
return false;
742 if (EVT::operator==(VT))
return true;
750 assert(
isSimple() &&
"Expected a SimpleValueType!");
763 assert(
isVector() &&
"Invalid vector type!");
766 return getExtendedVectorElementType();
772 assert(
isVector() &&
"Invalid vector type!");
775 return getExtendedVectorNumElements();
782 return getExtendedSizeInBits();
827 return !(NElts & (NElts - 1));
869 return L.LLVMTy < R.LLVMTy;
879 EVT changeExtendedVectorElementTypeToInteger()
const;
882 unsigned NumElements);
883 bool isExtendedFloatingPoint()
const;
884 bool isExtendedInteger()
const;
885 bool isExtendedVector()
const;
886 bool isExtended16BitVector()
const;
887 bool isExtended32BitVector()
const;
888 bool isExtended64BitVector()
const;
889 bool isExtended128BitVector()
const;
890 bool isExtended256BitVector()
const;
891 bool isExtended512BitVector()
const;
892 bool isExtended1024BitVector()
const;
893 EVT getExtendedVectorElementType()
const;
894 unsigned getExtendedVectorNumElements()
const;
895 unsigned getExtendedSizeInBits()
const;
EVT getRoundIntegerType(LLVMContext &Context) const
bool is16BitVector() const
is16BitVector - Return true if this is a 16-bit vector type.
bool is32BitVector() const
is32BitVector - Return true if this is a 32-bit vector type.
static MVT getIntegerVT(unsigned BitWidth)
COFF::RelocationTypeX86 Type
unsigned Log2_32_Ceil(uint32_t Value)
bool is1024BitVector() const
is1024BitVector - Return true if this is a 1024-bit vector type.
static MVT getVectorVT(MVT VT, unsigned NumElements)
bool is512BitVector() const
is512BitVector - Return true if this is a 512-bit vector type.
bool operator>=(const MVT &S) const
static MVT getFloatingPointVT(unsigned BitWidth)
Type * getTypeForEVT(LLVMContext &Context) const
unsigned getSizeInBits() const
bool is32BitVector() const
is32BitVector - Return true if this is a 32-bit vector type.
bool bitsLT(MVT VT) const
Return true if this has less bits than VT.
EVT(MVT::SimpleValueType SVT)
bool bitsLT(EVT VT) const
bitsLT - Return true if this has less bits than VT.
bool is1024BitVector() const
is1024BitVector - Return true if this is a 1024-bit vector type.
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. "i32".
bool isRound() const
isRound - Return true if the size is a power-of-two number of bytes.
bool bitsLE(MVT VT) const
Return true if this has no more bits than VT.
#define llvm_unreachable(msg)
bool operator!=(const MVT &S) const
MVT getScalarType() const
EVT getScalarType() const
bool bitsGE(EVT VT) const
bitsGE - Return true if this has no less bits than VT.
unsigned getStoreSize() const
bool isInteger() const
isInteger - Return true if this is an integer, or a vector integer type.
EVT getVectorElementType() const
bool bitsGE(MVT VT) const
Return true if this has no less bits than VT.
bool operator==(const MVT &S) const
EVT getHalfSizedIntegerVT(LLVMContext &Context) const
bool operator()(EVT L, EVT R) const
bool bitsLE(EVT VT) const
bitsLE - Return true if this has no more bits than VT.
bool isPow2VectorType() const
isPow2VectorType - Returns true if the given vector is a power of 2.
bool operator<(const MVT &S) const
unsigned getStoreSize() const
unsigned getStoreSizeInBits() const
bool isInteger() const
isInteger - Return true if this is an integer, or a vector integer type.
bool is256BitVector() const
is256BitVector - Return true if this is a 256-bit vector type.
unsigned getVectorNumElements() const
bool isVector() const
isVector - Return true if this is a vector value type.
bool operator<=(const MVT &S) const
bool isFloatingPoint() const
isFloatingPoint - Return true if this is a FP, or a vector FP type.
bool isPow2VectorType() const
isPow2VectorType - Returns true if the given vector is a power of 2.
static EVT getFloatingPointVT(unsigned BitWidth)
static MVT getVT(Type *Ty, bool HandleUnknown=false)
bool bitsEq(EVT VT) const
bitsEq - Return true if this has the same number of bits as VT.
static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements)
bool bitsGT(EVT VT) const
bitsGT - Return true if this has more bits than VT.
bool is16BitVector() const
is16BitVector - Return true if this is a 16-bit vector type.
bool isOverloaded() const
isOverloaded - Return true if this is an overloaded type for TableGen.
bool is64BitVector() const
is64BitVector - Return true if this is a 64-bit vector type.
bool is128BitVector() const
is128BitVector - Return true if this is a 128-bit vector type.
bool operator==(EVT VT) const
bool is256BitVector() const
is256BitVector - Return true if this is a 256-bit vector type.
bool operator!=(EVT VT) const
unsigned getStoreSizeInBits() const
unsigned getSizeInBits() const
getSizeInBits - Return the size of the specified value type in bits.
intptr_t getRawBits() const
static EVT getEVT(Type *Ty, bool HandleUnknown=false)
EVT getPow2VectorType(LLVMContext &Context) const
bool is128BitVector() const
is128BitVector - Return true if this is a 128-bit vector type.
bool isByteSized() const
isByteSized - Return true if the bit size is a multiple of 8.
bool isFloatingPoint() const
isFloatingPoint - Return true if this is a FP, or a vector FP type.
bool operator>(const MVT &S) const
bool bitsGT(MVT VT) const
Return true if this has more bits than VT.
MVT getPow2VectorType() const
MVT getVectorElementType() const
bool is512BitVector() const
is512BitVector - Return true if this is a 512-bit vector type.
bool is64BitVector() const
is64BitVector - Return true if this is a 64-bit vector type.
static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth)
EVT changeVectorElementTypeToInteger() const
unsigned getVectorNumElements() const