class LLT

Declaration

class LLT { /* full declaration omitted */ };

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:39

Member Variables

private uint64_t IsScalar
private uint64_t IsPointer
private uint64_t IsVector
private uint64_t RawData
private static const llvm::LLT::BitFieldInfo ScalarSizeFieldInfo = {32, 0}
This is how the bitfields are packed per Kind: * Invalid: gets encoded as RawData == 0, as that is an invalid encoding, since for valid encodings, SizeInBits/SizeOfElement must be larger than 0. * Non-pointer scalar (isPointer == 0 & & isVector == 0): SizeInBits: 32;
private static const llvm::LLT::BitFieldInfo PointerSizeFieldInfo = {16, 0}
* Pointer (isPointer == 1 & & isVector == 0): SizeInBits: 16; AddressSpace: 24;
private static const llvm::LLT::BitFieldInfo PointerAddressSpaceFieldInfo = {24, PointerSizeFieldInfo[0] + PointerSizeFieldInfo[1]}
private static const llvm::LLT::BitFieldInfo VectorElementsFieldInfo = {16, 0}
* Vector-of-non-pointer (isPointer == 0 & & isVector == 1): NumElements: 16; SizeOfElement: 32; Scalable: 1;
private static const llvm::LLT::BitFieldInfo VectorSizeFieldInfo = {32, VectorElementsFieldInfo[0] + VectorElementsFieldInfo[1]}
private static const llvm::LLT::BitFieldInfo VectorScalableFieldInfo = {1, VectorSizeFieldInfo[0] + VectorSizeFieldInfo[1]}
private static const llvm::LLT::BitFieldInfo PointerVectorElementsFieldInfo = {16, 0}
* Vector-of-pointer (isPointer == 1 & & isVector == 1): NumElements: 16; SizeOfElement: 16; AddressSpace: 24; Scalable: 1;
private static const llvm::LLT::BitFieldInfo PointerVectorSizeFieldInfo = {16, PointerVectorElementsFieldInfo[1] + PointerVectorElementsFieldInfo[0]}
private static const llvm::LLT::BitFieldInfo PointerVectorAddressSpaceFieldInfo = {24, PointerVectorSizeFieldInfo[1] + PointerVectorSizeFieldInfo[0]}
private static const llvm::LLT::BitFieldInfo PointerVectorScalableFieldInfo = {1, PointerVectorAddressSpaceFieldInfo[0] + PointerVectorAddressSpaceFieldInfo[1]}

Method Overview

  • public LLT(bool isPointer, bool isVector, bool isScalar, llvm::ElementCount EC, uint64_t SizeInBits, unsigned int AddressSpace)
  • public LLT()
  • public LLT(llvm::MVT VT)
  • public llvm::LLT changeElementCount(llvm::ElementCount EC) const
  • public llvm::LLT changeElementSize(unsigned int NewEltSize) const
  • public llvm::LLT changeElementType(llvm::LLT NewEltTy) const
  • public llvm::LLT divide(int Factor) const
  • public void dump() const
  • public static llvm::LLT fixed_vector(unsigned int NumElements, unsigned int ScalarSizeInBits)
  • public static llvm::LLT fixed_vector(unsigned int NumElements, llvm::LLT ScalarTy)
  • public unsigned int getAddressSpace() const
  • public llvm::ElementCount getElementCount() const
  • public llvm::LLT getElementType() const
  • private uint64_t getFieldValue(const int * FieldInfo) const
  • private static uint64_t getMask(const int * FieldInfo)
  • public uint16_t getNumElements() const
  • public unsigned int getScalarSizeInBits() const
  • public llvm::LLT getScalarType() const
  • public llvm::TypeSize getSizeInBits() const
  • public llvm::TypeSize getSizeInBytes() const
  • public uint64_t getUniqueRAWLLTData() const
  • private void init(bool IsPointer, bool IsVector, bool IsScalar, llvm::ElementCount EC, uint64_t SizeInBits, unsigned int AddressSpace)
  • public bool isByteSized() const
  • public bool isPointer() const
  • public bool isScalable() const
  • public bool isScalar() const
  • public bool isValid() const
  • public bool isVector() const
  • private static uint64_t maskAndShift(uint64_t Val, const int * FieldInfo)
  • private static uint64_t maskAndShift(uint64_t Val, uint64_t Mask, uint8_t Shift)
  • public llvm::LLT multiplyElements(int Factor) const
  • public static llvm::LLT pointer(unsigned int AddressSpace, unsigned int SizeInBits)
  • public void print(llvm::raw_ostream & OS) const
  • public static llvm::LLT scalable_vector(unsigned int MinNumElements, llvm::LLT ScalarTy)
  • public static llvm::LLT scalable_vector(unsigned int MinNumElements, unsigned int ScalarSizeInBits)
  • public static llvm::LLT scalar(unsigned int SizeInBits)
  • public static llvm::LLT scalarOrVector(llvm::ElementCount EC, llvm::LLT ScalarTy)
  • public static llvm::LLT scalarOrVector(llvm::ElementCount EC, uint64_t ScalarSize)
  • public static llvm::LLT vector(llvm::ElementCount EC, unsigned int ScalarSizeInBits)
  • public static llvm::LLT vector(llvm::ElementCount EC, llvm::LLT ScalarTy)

Methods

LLT(bool isPointer,
    bool isVector,
    bool isScalar,
    llvm::ElementCount EC,
    uint64_t SizeInBits,
    unsigned int AddressSpace)

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:107

Parameters

bool isPointer
bool isVector
bool isScalar
llvm::ElementCount EC
uint64_t SizeInBits
unsigned int AddressSpace

LLT()

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:111

LLT(llvm::MVT VT)

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:114

Parameters

llvm::MVT VT

llvm::LLT changeElementCount(
    llvm::ElementCount EC) const

Description

Return a vector or scalar with the same element type and the new element count.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:189

Parameters

llvm::ElementCount EC

llvm::LLT changeElementSize(
    unsigned int NewEltSize) const

Description

If this type is a vector, return a vector with the same number of elements but the new element size. Otherwise, return the new element type. Invalid for pointer types. For pointer types, use changeElementType.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:180

Parameters

unsigned int NewEltSize

llvm::LLT changeElementType(
    llvm::LLT NewEltTy) const

Description

If this type is a vector, return a vector with the same number of elements but the new element type. Otherwise, return the new element type.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:173

Parameters

llvm::LLT NewEltTy

llvm::LLT divide(int Factor) const

Description

Return a type that is \p Factor times smaller. Reduces the number of elements if this is a vector, or the bitwidth for scalar/pointers. Does not attempt to handle cases that aren't evenly divisible.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:196

Parameters

int Factor

void dump() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:259

static llvm::LLT fixed_vector(
    unsigned int NumElements,
    unsigned int ScalarSizeInBits)

Description

Get a low-level fixed-width vector of some number of elements and element width.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:74

Parameters

unsigned int NumElements
unsigned int ScalarSizeInBits

static llvm::LLT fixed_vector(
    unsigned int NumElements,
    llvm::LLT ScalarTy)

Description

Get a low-level fixed-width vector of some number of elements and element type.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:80

Parameters

unsigned int NumElements
llvm::LLT ScalarTy

unsigned int getAddressSpace() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:238

llvm::ElementCount getElementCount() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:143

llvm::LLT getElementType() const

Description

Returns the vector's element type. Only valid for vector types.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:248

uint64_t getFieldValue(const int* FieldInfo) const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:349

Parameters

const int* FieldInfo

static uint64_t getMask(const int* FieldInfo)

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:338

Parameters

const int* FieldInfo

uint16_t getNumElements() const

Description

Returns the number of elements in a vector LLT. Must only be called on vector types.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:126

unsigned int getScalarSizeInBits() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:224

llvm::LLT getScalarType() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:167

llvm::TypeSize getSizeInBits() const

Description

Returns the total size of the type. Must only be called on sized types.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:152

llvm::TypeSize getSizeInBytes() const

Description

Returns the total size of the type in bytes, i.e. number of whole bytes needed to represent the size in bits. Must only be called on sized types.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:162

uint64_t getUniqueRAWLLTData() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:385

void init(bool IsPointer,
          bool IsVector,
          bool IsScalar,
          llvm::ElementCount EC,
          uint64_t SizeInBits,
          unsigned int AddressSpace)

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:353

Parameters

bool IsPointer
bool IsVector
bool IsScalar
llvm::ElementCount EC
uint64_t SizeInBits
unsigned int AddressSpace

bool isByteSized() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:222

bool isPointer() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:120

bool isScalable() const

Description

Returns true if the LLT is a scalable vector. Must only be called on vector types.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:137

bool isScalar() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:118

bool isValid() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:116

bool isVector() const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:122

static uint64_t maskAndShift(uint64_t Val,
                             const int* FieldInfo)

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:346

Parameters

uint64_t Val
const int* FieldInfo

static uint64_t maskAndShift(uint64_t Val,
                             uint64_t Mask,
                             uint8_t Shift)

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:342

Parameters

uint64_t Val
uint64_t Mask
uint8_t Shift

llvm::LLT multiplyElements(int Factor) const

Description

Produce a vector type that is \p Factor times bigger, preserving the element type. For a scalar or pointer, this will produce a new vector with\p Factor elements.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:213

Parameters

int Factor

static llvm::LLT pointer(
    unsigned int AddressSpace,
    unsigned int SizeInBits)

Description

Get a low-level pointer in the given address space.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:49

Parameters

unsigned int AddressSpace
unsigned int SizeInBits

void print(llvm::raw_ostream& OS) const

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:256

Parameters

llvm::raw_ostream& OS

static llvm::LLT scalable_vector(
    unsigned int MinNumElements,
    llvm::LLT ScalarTy)

Description

Get a low-level scalable vector of some number of elements and element type.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:93

Parameters

unsigned int MinNumElements
llvm::LLT ScalarTy

static llvm::LLT scalable_vector(
    unsigned int MinNumElements,
    unsigned int ScalarSizeInBits)

Description

Get a low-level scalable vector of some number of elements and element width.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:86

Parameters

unsigned int MinNumElements
unsigned int ScalarSizeInBits

static llvm::LLT scalar(unsigned int SizeInBits)

Description

Get a low-level scalar or aggregate "bag of bits".

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:42

Parameters

unsigned int SizeInBits

static llvm::LLT scalarOrVector(
    llvm::ElementCount EC,
    llvm::LLT ScalarTy)

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:97

Parameters

llvm::ElementCount EC
llvm::LLT ScalarTy

static llvm::LLT scalarOrVector(
    llvm::ElementCount EC,
    uint64_t ScalarSize)

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:101

Parameters

llvm::ElementCount EC
uint64_t ScalarSize

static llvm::LLT vector(
    llvm::ElementCount EC,
    unsigned int ScalarSizeInBits)

Description

Get a low-level vector of some number of elements and element width.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:56

Parameters

llvm::ElementCount EC
unsigned int ScalarSizeInBits

static llvm::LLT vector(llvm::ElementCount EC,
                        llvm::LLT ScalarTy)

Description

Get a low-level vector of some number of elements and element type.

Declared at: llvm/include/llvm/Support/LowLevelTypeImpl.h:63

Parameters

llvm::ElementCount EC
llvm::LLT ScalarTy