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

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:225

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:237

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:231

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:249

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:243

Parameters

llvm::EVT VT

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:115

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:96

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:404

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:394

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:366

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:343

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:381

Parameters

llvm::LLVMContext& Context

intptr_t getRawBits() const

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

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:332

Parameters

llvm::LLVMContext& Context

llvm::TypeSize getScalarSizeInBits() const

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

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:262

llvm::MVT getSimpleVT() const

Description

Return the SimpleValueType held in the specified simple EVT.

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

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:298

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:314

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:325

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:399

Parameters

llvm::LLVMContext& Context

llvm::ElementCount getVectorElementCount() const

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

llvm::EVT getVectorElementType() const

Description

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

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

unsigned int getVectorNumElements() const

Description

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

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

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

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:85

Parameters

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

bool is1024BitVector() const

Description

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

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

bool is128BitVector() const

Description

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

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

bool is16BitVector() const

Description

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

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

bool is2048BitVector() const

Description

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

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

bool is256BitVector() const

Description

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

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

bool is32BitVector() const

Description

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

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

bool is512BitVector() const

Description

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

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

bool is64BitVector() const

Description

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

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

bool isByteSized() const

Description

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

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

bool isExtended() const

Description

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

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

bool isFloatingPoint() const

Description

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

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

bool isInteger() const

Description

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

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

bool isOverloaded() const

Description

Return true if this is an overloaded type for TableGen.

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

bool isPow2VectorType() const

Description

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

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

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:217

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:157

bool isScalarInteger() const

Description

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

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

bool isSimple() const

Description

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

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

bool isVector() const

Description

Return true if this is a vector value type.

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

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:357

Parameters

llvm::LLVMContext& Context