class MachineConstantPool

Declaration

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

Description

The MachineConstantPool class keeps track of constants referenced by a function which must be spilled to memory. This is used for constants which are unable to be used directly as operands to instructions, which typically include floating point and large integer constants. Instructions reference the address of these constant pool constants through the use of MO_ConstantPoolIndex values. When emitting assembly or machine code, these virtual address references are converted to refer to the address of the function constant pool values. The machine constant pool.

Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:120

Method Overview

Methods

MachineConstantPool(const llvm::DataLayout& DL)

Description

The only constructor.

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

Parameters

const llvm::DataLayout& DL

void dump() const

Description

dump - Call print(cerr) to be called from the debugger.

Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:158

unsigned int getConstantPoolAlignment() const

Description

getConstantPoolAlignment - Return the alignment required by the whole constant pool, of which the first element must be aligned.

Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:137

unsigned int getConstantPoolIndex(
    const llvm::Constant* C,
    unsigned int Alignment)

Description

getConstantPoolIndex - Create a new entry in the constant pool or return an existing one. User must specify the minimum required alignment for the object.

Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:142

Parameters

const llvm::Constant* C
unsigned int Alignment

unsigned int getConstantPoolIndex(
    llvm::MachineConstantPoolValue* V,
    unsigned int Alignment)

Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:143

Parameters

llvm::MachineConstantPoolValue* V
unsigned int Alignment

const std::vector<MachineConstantPoolEntry>&
getConstants() const

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

bool isEmpty() const

Description

isEmpty - Return true if this constant pool contains no constants.

Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:147

void print(llvm::raw_ostream& OS) const

Description

print - Used by the MachineFunction printer to print information about constant pool objects. Implemented in MachineFunction.cpp

Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:155

Parameters

llvm::raw_ostream& OS

~MachineConstantPool()

Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:133