struct EVT

Declaration

struct EVT { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:34

Member Variables

private llvm::MVT V = MVT::INVALID_SIMPLE_VALUE_TYPE
private llvm::Type* LLVMTy = nullptr

Method Overview

Methods

constexpr EVT(MVT::SimpleValueType SVT)

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:41

Parameters

MVT::SimpleValueType SVT

constexpr EVT(llvm::MVT S)

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:42

Parameters

llvm::MVT S

EVT()

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:40

bool bitsEq(llvm::EVT VT) const

Description

Return true if this has the same number of bits as VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:228

Parameters

llvm::EVT VT

bool bitsGE(llvm::EVT VT) const

Description

Return true if this has no less bits than VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:264

Parameters

llvm::EVT VT

bool bitsGT(llvm::EVT VT) const

Description

Return true if this has more bits than VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:256

Parameters

llvm::EVT VT

bool bitsLE(llvm::EVT VT) const

Description

Return true if this has no more bits than VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:280

Parameters

llvm::EVT VT

bool bitsLT(llvm::EVT VT) const

Description

Return true if this has less bits than VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:272

Parameters

llvm::EVT VT

llvm::EVT changeExtendedTypeToInteger() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:491

llvm::EVT changeExtendedVectorElementType(
    llvm::EVT EltVT) const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:492

Parameters

llvm::EVT EltVT

llvm::EVT
changeExtendedVectorElementTypeToInteger() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:493

llvm::EVT changeTypeToInteger()

Description

Return the type converted to an equivalently sized integer or vector with integer element type. Similar to changeVectorElementTypeToInteger, but also handles scalars.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:113

llvm::EVT changeVectorElementType(
    llvm::EVT EltVT) const

Description

Return a VT for a vector type whose attributes match ourselves with the exception of the element type that is chosen by the caller.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:101

Parameters

llvm::EVT EltVT

llvm::EVT changeVectorElementTypeToInteger() const

Description

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.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:93

llvm::EVT getDoubleNumVectorElementsVT(
    llvm::LLVMContext& Context) const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:430

Parameters

llvm::LLVMContext& Context

static llvm::EVT getEVT(
    llvm::Type* Ty,
    bool HandleUnknown = false)

Description

Return the value type corresponding to the specified type. This returns all pointers as iPTR. If HandleUnknown is true, unknown types are returned as Other, otherwise they are invalid.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:467

Parameters

llvm::Type* Ty
bool HandleUnknown = false

std::string getEVTString() const

Description

This function returns value type as a string, e.g. "i32".

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:457

static llvm::EVT getExtendedIntegerVT(
    llvm::LLVMContext& C,
    unsigned int BitWidth)

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:494

Parameters

llvm::LLVMContext& C
unsigned int BitWidth

llvm::TypeSize getExtendedSizeInBits() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:516

llvm::ElementCount getExtendedVectorElementCount()
    const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:515

llvm::EVT getExtendedVectorElementType() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:513

unsigned int getExtendedVectorNumElements() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:514

static llvm::EVT getExtendedVectorVT(
    llvm::LLVMContext& Context,
    llvm::EVT VT,
    llvm::ElementCount EC)

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:497

Parameters

llvm::LLVMContext& Context
llvm::EVT VT
llvm::ElementCount EC

static llvm::EVT getExtendedVectorVT(
    llvm::LLVMContext& C,
    llvm::EVT VT,
    unsigned int NumElements,
    bool IsScalable)

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:495

Parameters

llvm::LLVMContext& C
llvm::EVT VT
unsigned int NumElements
bool IsScalable

uint64_t getFixedSizeInBits() const

Description

Return the size of the specified fixed width value type in bits. The function will assert if the type is scalable.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:348

static llvm::EVT getFloatingPointVT(
    unsigned int BitWidth)

Description

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.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:58

Parameters

unsigned int BitWidth

llvm::EVT getHalfNumVectorElementsVT(
    llvm::LLVMContext& Context) const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:420

Parameters

llvm::LLVMContext& Context

llvm::EVT getHalfSizedIntegerVT(
    llvm::LLVMContext& Context) const

Description

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.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:397

Parameters

llvm::LLVMContext& Context

static llvm::EVT getIntegerVT(
    llvm::LLVMContext& Context,
    unsigned int BitWidth)

Description

Returns the EVT that represents an integer with the given number of bits.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:64

Parameters

llvm::LLVMContext& Context
unsigned int BitWidth

llvm::EVT getPow2VectorType(
    llvm::LLVMContext& Context) const

Description

Widens the length of the given vector EVT up to the nearest power of 2 and returns that type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:444

Parameters

llvm::LLVMContext& Context

intptr_t getRawBits() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:469

llvm::EVT getRoundIntegerType(
    llvm::LLVMContext& Context) const

Description

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.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:386

Parameters

llvm::LLVMContext& Context

uint64_t getScalarSizeInBits() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:352

uint64_t getScalarStoreSize() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:369

llvm::EVT getScalarType() const

Description

If this is a vector type, return the element type, otherwise return this.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:295

llvm::MVT getSimpleVT() const

Description

Return the SimpleValueType held in the specified simple EVT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:288

llvm::TypeSize getSizeInBits() const

Description

Return the size of the specified value type in bits. If the value type is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:340

llvm::TypeSize getStoreSize() const

Description

Return the number of bytes overwritten by a store of the specified value type. If the value type is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:362

llvm::TypeSize getStoreSizeInBits() const

Description

Return the number of bits overwritten by a store of the specified value type. If the value type is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:379

llvm::Type* getTypeForEVT(
    llvm::LLVMContext& Context) const

Description

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.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:462

Parameters

llvm::LLVMContext& Context

llvm::ElementCount getVectorElementCount() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:322

llvm::EVT getVectorElementType() const

Description

Given a vector type, return the type of each element.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:300

unsigned int getVectorMinNumElements() const

Description

Given a vector type, return the minimum number of elements it contains.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:331

unsigned int getVectorNumElements() const

Description

Given a vector type, return the number of elements it contains.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:308

static llvm::EVT getVectorVT(
    llvm::LLVMContext& Context,
    llvm::EVT VT,
    llvm::ElementCount EC)

Description

Returns the EVT that represents a vector EC.Min elements in length, where each element is of type VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:83

Parameters

llvm::LLVMContext& Context
llvm::EVT VT
llvm::ElementCount EC

static llvm::EVT getVectorVT(
    llvm::LLVMContext& Context,
    llvm::EVT VT,
    unsigned int NumElements,
    bool IsScalable = false)

Description

Returns the EVT that represents a vector NumElements in length, where each element is of type VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:73

Parameters

llvm::LLVMContext& Context
llvm::EVT VT
unsigned int NumElements
bool IsScalable = false

bool is1024BitVector() const

Description

Return true if this is a 1024-bit vector type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:200

bool is128BitVector() const

Description

Return true if this is a 128-bit vector type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:185

bool is16BitVector() const

Description

Return true if this is a 16-bit vector type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:170

bool is2048BitVector() const

Description

Return true if this is a 2048-bit vector type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:205

bool is256BitVector() const

Description

Return true if this is a 256-bit vector type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:190

bool is32BitVector() const

Description

Return true if this is a 32-bit vector type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:175

bool is512BitVector() const

Description

Return true if this is a 512-bit vector type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:195

bool is64BitVector() const

Description

Return true if this is a 64-bit vector type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:180

bool isByteSized() const

Description

Return true if the bit size is a multiple of 8.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:215

bool isExtended() const

Description

Test if the given EVT is extended (as opposed to being simple).

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:134

bool isExtended1024BitVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:509

bool isExtended128BitVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:506

bool isExtended16BitVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:503

bool isExtended2048BitVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:510

bool isExtended256BitVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:507

bool isExtended32BitVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:504

bool isExtended512BitVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:508

bool isExtended64BitVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:505

bool isExtendedFixedLengthVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:511

bool isExtendedFloatingPoint() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:499

bool isExtendedInteger() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:500

bool isExtendedScalableVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:512

bool isExtendedScalarInteger() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:501

bool isExtendedVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:502

bool isFixedLengthVector() const

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:164

bool isFloatingPoint() const

Description

Return true if this is a FP or a vector FP type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:139

bool isInteger() const

Description

Return true if this is an integer or a vector integer type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:144

bool isOverloaded() const

Description

Return true if this is an overloaded type for TableGen.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:210

bool isPow2VectorType() const

Description

Returns true if the given vector is a power of 2.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:437

bool isRound() const

Description

Return true if the size is a power-of-two number of bytes.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:220

bool isScalableVector() const

Description

Return true if this is a vector type where the runtime length is machine dependent

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:160

bool isScalarInteger() const

Description

Return true if this is an integer, but not a vector.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:149

bool isSimple() const

Description

Test if the given EVT is simple (as opposed to being extended).

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:129

bool isVector() const

Description

Return true if this is a vector value type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:154

bool isZeroSized() const

Description

Test if the given EVT has zero size, this will fail if called on a scalable type

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:124

bool knownBitsGE(llvm::EVT VT) const

Description

Return true if we know at compile time this has more than or the same bits as VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:240

Parameters

llvm::EVT VT

bool knownBitsGT(llvm::EVT VT) const

Description

Return true if we know at compile time this has more bits than VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:234

Parameters

llvm::EVT VT

bool knownBitsLE(llvm::EVT VT) const

Description

Return true if we know at compile time this has fewer than or the same bits as VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:251

Parameters

llvm::EVT VT

bool knownBitsLT(llvm::EVT VT) const

Description

Return true if we know at compile time this has fewer bits than VT.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:245

Parameters

llvm::EVT VT

llvm::EVT widenIntegerVectorElementType(
    llvm::LLVMContext& Context) const

Description

Return a VT for an integer vector type with the size of the elements doubled. The typed returned may be an extended type.

Declared at: llvm/include/llvm/CodeGen/ValueTypes.h:411

Parameters

llvm::LLVMContext& Context