llvm::EVT

Extended Value Type. Capable of holding value types which are not native for any processor (such as the i12345 type), as well as the types an MVT can represent.

Synopsis

Declared in <llvm/CodeGen/ValueTypes.h>

struct EVT;

Types

NameDescription
compareRawBits A meaningless but well-behaved order, useful for constructing containers.

Member Functions

NameDescription
EVT [constructor]Constructors
bitsEq Return true if this has the same number of bits as VT.
bitsGE Return true if this has no less bits than VT.
bitsGT Return true if this has more bits than VT.
bitsLE Return true if this has no more bits than VT.
bitsLT Return true if this has less bits than VT.
changeElementType Return a VT for a type whose attributes match ourselves with the exception of the element type that is chosen by the caller.
changeTypeToInteger Return the type converted to an equivalently sized integer or vector with integer element type. Similar to changeVectorElementTypeToInteger, but also handles scalars.
changeVectorElementCount Return a VT for a vector type whose attributes match ourselves with the exception of the element count that is chosen by the caller.
changeVectorElementType Return a VT for a vector type whose attributes match ourselves with the exception of the element type that is chosen by the caller.
changeVectorElementTypeToInteger Return a vector with the same number of elements as this vector, but with the element type converted to an integer type with the same bitwidth.
dump Support for debugging, callable in GDB: VT.dump()
getDoubleNumVectorElementsVT
getEVTString This function returns value type as a string, e.g. "i32".
getFixedSizeInBits Return the size of the specified fixed width value type in bits. The function will assert if the type is scalable.
getFltSemantics Returns an APFloat semantics tag appropriate for the value type. If this is a vector type, the element semantics are returned.
getHalfNumVectorElementsVT
getHalfSizedIntegerVT Finds the smallest simple value type that is greater than or equal to half the width of this EVT. If no simple value type can be found, an extended integer value type of half the size (rounded up) is returned.
getPow2VectorType Widens the length of the given vector EVT up to the nearest power of 2 and returns that type.
getRISCVVectorTupleNumFields Given a RISCV vector tuple type, return the num_fields.
getRawBits
getRoundIntegerType Rounds the bit-width of the given integer EVT up to the nearest power of two (and at least to eight), and returns the integer EVT with that number of bits.
getScalarSizeInBits
getScalarStoreSize
getScalarType If this is a vector type, return the element type, otherwise return this.
getSimpleVT Return the SimpleValueType held in the specified simple EVT.
getSizeInBits Return the size of the specified value type in bits.
getStoreSize Return the number of bytes overwritten by a store of the specified value type.
getStoreSizeInBits Return the number of bits overwritten by a store of the specified value type.
getTypeForEVT This method returns an LLVM type corresponding to the specified EVT. For integer types, this returns an unsigned type. Note that this will abort for types that cannot be represented.
getVectorElementCount
getVectorElementType Given a vector type, return the type of each element.
getVectorMinNumElements Given a vector type, return the minimum number of elements it contains.
getVectorNumElements Given a vector type, return the number of elements it contains.
is1024BitVector Return true if this is a 1024-bit vector type.
is128BitVector Return true if this is a 128-bit vector type.
is16BitVector Return true if this is a 16-bit vector type.
is2048BitVector Return true if this is a 2048-bit vector type.
is256BitVector Return true if this is a 256-bit vector type.
is32BitVector Return true if this is a 32-bit vector type.
is512BitVector Return true if this is a 512-bit vector type.
is64BitVector Return true if this is a 64-bit vector type.
isByteSized Return true if the bit size is a multiple of 8.
isCheriCapability Return true if this is a capability type.
isExtended Test if the given EVT is extended (as opposed to being simple).
isFixedLengthVector
isFixedLengthVectorOf Return true if this is a fixed length vector with matching element type.
isFloatingPoint Return true if this is a FP or a vector FP type.
isInteger Return true if this is an integer or a vector integer type.
isOverloaded Return true if this is an overloaded type for TableGen.
isPow2VectorType Returns true if the given vector is a power of 2.
isRISCVVectorTuple Return true if this is a vector value type.
isRound Return true if the size is a power-of-two number of bytes.
isScalableTargetExtVT Return true if this is a vector type where the runtime length is machine dependent
isScalableVT Return true if the type is a scalable type.
isScalableVector Return true if this is a vector type where the runtime length is machine dependent
isScalableVectorOf Return true if this is a scalable vector with matching element type.
isScalarInteger Return true if this is an integer, but not a vector.
isSimple Test if the given EVT is simple (as opposed to being extended).
isVector Return true if this is a vector value type.
isVectorOf Return true if this is a vector with matching element type.
isZeroSized Test if the given EVT has zero size, this will fail if called on a scalable type
knownBitsGE Return true if we know at compile time this has more than or the same bits as VT.
knownBitsGT Return true if we know at compile time this has more bits than VT.
knownBitsLE Return true if we know at compile time this has fewer than or the same bits as VT.
knownBitsLT Return true if we know at compile time this has fewer bits than VT.
print Implement operator<<.
widenIntegerElementType Return a VT for an integer element type with doubled bit width. The type returned may be an extended type.
widenIntegerVectorElementType Return a VT for an integer vector type with the size of the elements doubled. The type returned may be an extended type.
operator== Equality operator
operator!= Inequality operator

Static Member Functions

NameDescription
getEVT Return the value type corresponding to the specified type. If HandleUnknown is true, unknown types are returned as Other, otherwise they are invalid. NB: This includes pointer types, which require a DataLayout to convert to a concrete value type.
getFloatingPointVT Returns the EVT that represents a floating-point type with the given number of bits. There are two floating-point types with 128 bits - this returns f128 rather than ppcf128.
getIntegerVT Returns the EVT that represents an integer with the given number of bits.
getVectorVT getVectorVT overloads

Non-Member Functions

NameDescription
RTLIB::getCTPOP
RTLIB::getFPEXTgetFPEXT - Return the FPEXT_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getFPLibCallGetFPLibCall - Helper to return the right libcall for the given floating point type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getFPROUNDgetFPROUND - Return the FPROUND_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getFPTOSINTgetFPTOSINT - Return the FPTOSINT_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getFPTOUINTgetFPTOUINT - Return the FPTOUINT_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getMUL
RTLIB::getMULO
RTLIB::getSDIV
RTLIB::getSHL
RTLIB::getSINTTOFPgetSINTTOFP - Return the SINTTOFP_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getSRA
RTLIB::getSREM
RTLIB::getSRL
RTLIB::getUDIV
RTLIB::getUINTTOFPgetUINTTOFP - Return the UINTTOFP_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getUREM
SDPatternMatch::m_SpecificScalarVTMatch a scalar ValueType.
SDPatternMatch::m_SpecificVTMatch a specific ValueType.
SDPatternMatch::m_SpecificVectorElementVTMatch a vector ValueType.
SDPatternMatch::m_VTRetreive the ValueType of the current SDValue.