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.
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 Return a VT for a vector type with the same element type but double the number of elements.
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 Return a VT for a vector type with the same element type but half the number of elements.
getHalfSizedIntegerVT Finds the smallest simple value type that is greater than or equal to half the width of this EVT.
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 Return the raw simple type or LLVM type pointer identifying this EVT.
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 Return the bit size of this type, or of its element type if a vector.
getScalarStoreSize Return the number of bytes overwritten by a store of this value type or this value type's element type in the case of a vector.
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.
getVectorElementCount Given a (possibly scalable) vector type, return the ElementCount.
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 Return true if this is a fixed-length vector type.
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== Return true if this EVT equals VT.
operator!= Return true if this EVT differs from VT.

Static Member Functions

NameDescription
getEVT Return the value type corresponding to the specified type.
getFloatingPointVT Returns the EVT that represents a floating-point type with the given number of bits.
getIntegerVT Returns the EVT that represents an integer with the given number of bits.
getVectorVT getVectorVT overloads

Non-Member Functions

NameDescription
getApproximateEVTForLLTGet a rough equivalent of an EVT for a given LLT.
RTLIB::getCTPOPReturn the CTPOP_* value for the given type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getFPEXTReturn the FPEXT_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getFPLibCallReturn the right libcall for the given floating-point type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getFPROUNDReturn the FPROUND_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getFPTOSINTReturn the FPTOSINT_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getFPTOUINTReturn the FPTOUINT_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getMULReturn the MUL_* value for the given type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getMULOReturn the MULO_* value for the given type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getSDIVReturn the SDIV_* value for the given type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getSHLReturn the SHL_* value for the given type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getSINTTOFPReturn the SINTTOFP_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getSRAReturn the SRA_* value for the given type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getSREMReturn the SREM_* value for the given type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getSRLReturn the SRL_* value for the given type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getUDIVReturn the UDIV_* value for the given type, or UNKNOWN_LIBCALL if there is none.
RTLIB::getUINTTOFPReturn the UINTTOFP_* value for the given types, or UNKNOWN_LIBCALL if there is none.
RTLIB::getUREMReturn the UREM_* value for the given type, or UNKNOWN_LIBCALL if there is none.
SDPatternMatch::m_SpecificScalarVTMatch a scalar ValueType.
SDPatternMatch::m_SpecificScalarVTMatch a scalar ValueType.
SDPatternMatch::m_SpecificVTMatch a specific ValueType.
SDPatternMatch::m_SpecificVTMatch a specific ValueType.
SDPatternMatch::m_SpecificVectorElementVTMatch a vector ValueType.
SDPatternMatch::m_SpecificVectorElementVTMatch a vector ValueType.
SDPatternMatch::m_VTRetreive the ValueType of the current SDValue.
SDPatternMatch::m_VTBind the value type into VT and match nested pattern P.