|
LLVM 23.0.0git
|
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled to memory. More...
#include "llvm/CodeGen/MachineConstantPool.h"
Public Member Functions | |
| MachineConstantPool (const DataLayout &DL) | |
| The only constructor. | |
| LLVM_ABI | ~MachineConstantPool () |
| Align | getConstantPoolAlign () const |
| Return the alignment required by the whole constant pool, of which the first element must be aligned. | |
| LLVM_ABI unsigned | getConstantPoolIndex (const Constant *C, Align Alignment) |
| getConstantPoolIndex - Create a new entry in the constant pool or return an existing one. | |
| LLVM_ABI unsigned | getConstantPoolIndex (MachineConstantPoolValue *V, Align Alignment) |
| bool | isEmpty () const |
| isEmpty - Return true if this constant pool contains no constants. | |
| const std::vector< MachineConstantPoolEntry > & | getConstants () const |
| LLVM_ABI void | print (raw_ostream &OS) const |
| print - Used by the MachineFunction printer to print information about constant pool objects. | |
| LLVM_ABI void | dump () const |
| dump - Call print(cerr) to be called from the debugger. | |
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.
Definition at line 117 of file MachineConstantPool.h.
|
inlineexplicit |
The only constructor.
Definition at line 128 of file MachineConstantPool.h.
| MachineConstantPool::~MachineConstantPool | ( | ) |
Definition at line 1528 of file MachineFunction.cpp.
References llvm::CallingConv::C, and Deleted.
| LLVM_DUMP_METHOD void MachineConstantPool::dump | ( | ) | const |
dump - Call print(cerr) to be called from the debugger.
Definition at line 1660 of file MachineFunction.cpp.
References llvm::dbgs(), LLVM_DUMP_METHOD, and print().
|
inline |
Return the alignment required by the whole constant pool, of which the first element must be aligned.
Definition at line 134 of file MachineConstantPool.h.
getConstantPoolIndex - Create a new entry in the constant pool or return an existing one.
Create a new entry in the constant pool or return an existing one.
User must specify the minimum required alignment for the object.
User must specify the log2 of the minimum required alignment for the object.
Definition at line 1597 of file MachineFunction.cpp.
References llvm::CallingConv::C, CanShareConstantPoolEntry(), and llvm::getAlign().
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), duplicateCPV(), emitLoadFromConstantPool(), llvm::PPCInstrInfo::finalizeInsInstrs(), llvm::X86InstrInfo::foldMemoryOperandImpl(), and llvm::XtensaInstrInfo::loadImmediate().
| unsigned MachineConstantPool::getConstantPoolIndex | ( | MachineConstantPoolValue * | V, |
| Align | Alignment ) |
Definition at line 1616 of file MachineFunction.cpp.
|
inline |
Definition at line 146 of file MachineConstantPool.h.
Referenced by duplicateCPV(), llvm::AsmPrinter::emitConstantPool(), llvm::XtensaAsmPrinter::emitConstantPool(), EstimateFunctionSizeInBytes(), EstimateFunctionSizeInBytes(), llvm::PPCInstrInfo::getConstantFromConstantPool(), llvm::ARMConstantPoolConstant::getExistingMachineCPValue(), llvm::RISCVConstantPoolValue::getExistingMachineCPValue(), llvm::SystemZConstantPoolValue::getExistingMachineCPValue(), llvm::ARMConstantPoolValue::getExistingMachineCPValueImpl(), llvm::CSKYConstantPoolValue::getExistingMachineCPValueImpl(), llvm::XtensaConstantPoolValue::getExistingMachineCPValueImpl(), and llvm::ARMBaseInstrInfo::produceSameValue().
|
inline |
isEmpty - Return true if this constant pool contains no constants.
Definition at line 144 of file MachineConstantPool.h.
| void MachineConstantPool::print | ( | raw_ostream & | OS | ) | const |
print - Used by the MachineFunction printer to print information about constant pool objects.
Implemented in MachineFunction.cpp
Definition at line 1633 of file MachineFunction.cpp.
Referenced by dump().