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:117
Member Variables
- private llvm::Align PoolAlignment
- The alignment for the pool.
- private std::vector<MachineConstantPoolEntry> Constants
- The pool of constants.
- private DenseSet<llvm::MachineConstantPoolValue*> MachineCPVsSharingEntries
- MachineConstantPoolValues that use an existing MachineConstantPoolEntry.
- private const llvm::DataLayout& DL
Method Overview
- public MachineConstantPool(const llvm::DataLayout & DL)
- public void dump() const
- public llvm::Align getConstantPoolAlign() const
- public unsigned int getConstantPoolIndex(const llvm::Constant * C, llvm::Align Alignment)
- public unsigned int getConstantPoolIndex(llvm::MachineConstantPoolValue * V, llvm::Align Alignment)
- public const std::vector<MachineConstantPoolEntry> & getConstants() const
- private const llvm::DataLayout & getDataLayout() const
- public bool isEmpty() const
- public void print(llvm::raw_ostream & OS) const
- public ~MachineConstantPool()
Methods
¶MachineConstantPool(const llvm::DataLayout& DL)
MachineConstantPool(const llvm::DataLayout& DL)
Description
The only constructor.
Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:128
Parameters
- const llvm::DataLayout& DL
¶void dump() const
void dump() const
Description
dump - Call print(cerr) to be called from the debugger.
Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:154
¶llvm::Align getConstantPoolAlign() const
llvm::Align getConstantPoolAlign() const
Description
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:134
¶unsigned int getConstantPoolIndex(
const llvm::Constant* C,
llvm::Align Alignment)
unsigned int getConstantPoolIndex(
const llvm::Constant* C,
llvm::Align 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:139
Parameters
- const llvm::Constant* C
- llvm::Align Alignment
¶unsigned int getConstantPoolIndex(
llvm::MachineConstantPoolValue* V,
llvm::Align Alignment)
unsigned int getConstantPoolIndex(
llvm::MachineConstantPoolValue* V,
llvm::Align Alignment)
Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:140
Parameters
- llvm::MachineConstantPoolValue* V
- llvm::Align Alignment
¶const std::vector<MachineConstantPoolEntry>&
getConstants() const
const std::vector<MachineConstantPoolEntry>&
getConstants() const
Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:145
¶const llvm::DataLayout& getDataLayout() const
const llvm::DataLayout& getDataLayout() const
Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:124
¶bool isEmpty() const
bool isEmpty() const
Description
isEmpty - Return true if this constant pool contains no constants.
Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:143
¶void print(llvm::raw_ostream& OS) const
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:151
Parameters
¶~MachineConstantPool()
~MachineConstantPool()
Declared at: llvm/include/llvm/CodeGen/MachineConstantPool.h:130