struct MDNode::Header

Declaration

struct MDNode::Header { /* full declaration omitted */ };

Description

The header that is coallocated with an MDNode along with its "small" operands. It is located immediately before the main body of the node. The operands are in turn located immediately before the header. For resizable MDNodes, the space for the storage vector is also allocated immediately before the header, overlapping with the operands. Explicity set alignment because bitfields by default have an alignment of 1 on z/OS.

Declared at: llvm/include/llvm/IR/Metadata.h:956

Member Variables

public bool IsResizable
public bool IsLarge
public size_t SmallSize
public size_t SmallNumOps
public size_t
public unsigned int NumUnresolved = 0
public static const size_t NumOpsFitInVector = sizeof(llvm::SmallVector<llvm::MDOperand, 0>) / sizeof(llvm::MDOperand)
public static const size_t MaxSmallSize = 15

Method Overview

Methods

Header(size_t NumOps,
       llvm::Metadata::StorageType Storage)

Declared at: llvm/include/llvm/IR/Metadata.h:1025

Parameters

size_t NumOps
llvm::Metadata::StorageType Storage

static size_t getAllocSize(
    llvm::Metadata::StorageType Storage,
    size_t NumOps)

Description

Returns the number of bytes allocated for operands and header.

Declared at: llvm/include/llvm/IR/Metadata.h:984

Parameters

llvm::Metadata::StorageType Storage
size_t NumOps

size_t getAllocSize() const

Declared at: llvm/include/llvm/IR/Metadata.h:994

void* getAllocation()

Declared at: llvm/include/llvm/IR/Metadata.h:997

const llvm::MDNode::Header::LargeStorageVector&
getLarge() const

Declared at: llvm/include/llvm/IR/Metadata.h:1016

llvm::MDNode::Header::LargeStorageVector&
getLarge()

Declared at: llvm/include/llvm/IR/Metadata.h:1011

void* getLargePtr() const

Declared at: llvm/include/llvm/IR/Metadata.h:1002

unsigned int getNumOperands() const

Declared at: llvm/include/llvm/IR/Metadata.h:1042

static constexpr size_t getOpSize(
    unsigned int NumOps)

Declared at: llvm/include/llvm/IR/Metadata.h:974

Parameters

unsigned int NumOps

void* getSmallPtr()

Declared at: llvm/include/llvm/IR/Metadata.h:1009

static size_t getSmallSize(size_t NumOps,
                           bool IsResizable,
                           bool IsLarge)

Description

Returns the number of operands the node has space for based on its allocation characteristics.

Declared at: llvm/include/llvm/IR/Metadata.h:979

Parameters

size_t NumOps
bool IsResizable
bool IsLarge

static bool isLarge(size_t NumOps)

Declared at: llvm/include/llvm/IR/Metadata.h:992

Parameters

size_t NumOps

static bool isResizable(
    llvm::Metadata::StorageType Storage)

Description

Only temporary and distinct nodes are resizable.

Declared at: llvm/include/llvm/IR/Metadata.h:991

Parameters

llvm::Metadata::StorageType Storage

MutableArrayRef<llvm::MDOperand> operands()

Declared at: llvm/include/llvm/IR/Metadata.h:1028

ArrayRef<llvm::MDOperand> operands() const

Declared at: llvm/include/llvm/IR/Metadata.h:1035

void resize(size_t NumOps)

Declared at: llvm/include/llvm/IR/Metadata.h:1023

Parameters

size_t NumOps

void resizeSmall(size_t NumOps)

Declared at: llvm/include/llvm/IR/Metadata.h:1021

Parameters

size_t NumOps

void resizeSmallToLarge(size_t NumOps)

Declared at: llvm/include/llvm/IR/Metadata.h:1022

Parameters

size_t NumOps

~Header()

Declared at: llvm/include/llvm/IR/Metadata.h:1026