LLVM API Documentation
#include <MachineConstantPool.h>
Public Member Functions | |
| MachineConstantPool (const TargetData *td) | |
| The only constructor. | |
| ~MachineConstantPool () | |
| unsigned | getConstantPoolAlignment () const |
| unsigned | getConstantPoolIndex (Constant *C, unsigned Alignment) |
| unsigned | getConstantPoolIndex (MachineConstantPoolValue *V, unsigned Alignment) |
| bool | isEmpty () const |
| isEmpty - Return true if this constant pool contains no constants. | |
| const std::vector < MachineConstantPoolEntry > & | getConstants () const |
| void | print (raw_ostream &OS) const |
| 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.
Definition at line 109 of file MachineConstantPool.h.
| llvm::MachineConstantPool::MachineConstantPool | ( | const TargetData * | td | ) | [inline, explicit] |
| MachineConstantPool::~MachineConstantPool | ( | ) |
Definition at line 498 of file MachineFunction.cpp.
References Val.
Referenced by llvm::MachineFunction::~MachineFunction().
| unsigned llvm::MachineConstantPool::getConstantPoolAlignment | ( | ) | const [inline] |
getConstantPoolAlignment - Return the log2 of the alignment required by the whole constant pool, of which the first element must be aligned.
Definition at line 121 of file MachineConstantPool.h.
Referenced by llvm::AsmPrinter::EmitConstantPool().
getConstantPoolIndex - Create a new entry in the constant pool or return an existing one. User must specify the log2 of the minimum required alignment for the object.
getConstantPoolIndex - Create a new entry in the constant pool or return an existing one. User must specify the log2 of the minimum required alignment for the object.
Definition at line 508 of file MachineFunction.cpp.
References llvm::TargetData::getTypePaddedSize(), Offset, TD, and Val.
Referenced by llvm::ARMRegisterInfo::emitLoadConstPool(), and llvm::X86InstrInfo::foldMemoryOperandImpl().
| unsigned MachineConstantPool::getConstantPoolIndex | ( | MachineConstantPoolValue * | V, | |
| unsigned | Alignment | |||
| ) |
Definition at line 532 of file MachineFunction.cpp.
References llvm::MachineConstantPoolValue::getExistingMachineCPValue(), llvm::TargetData::getTypePaddedSize(), Idx, Offset, and TD.
| bool llvm::MachineConstantPool::isEmpty | ( | ) | const [inline] |
isEmpty - Return true if this constant pool contains no constants.
Definition at line 130 of file MachineConstantPool.h.
| const std::vector<MachineConstantPoolEntry>& llvm::MachineConstantPool::getConstants | ( | ) | const [inline] |
Definition at line 132 of file MachineConstantPool.h.
Referenced by llvm::MachOCodeEmitter::emitConstantPool(), llvm::AsmPrinter::EmitConstantPool(), GetConstantPoolSizeInBytes(), and llvm::ARMConstantPoolValue::getExistingMachineCPValue().
| 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 556 of file MachineFunction.cpp.
References llvm::Value::print(), and Val.
Referenced by dump(), and llvm::MachineFunction::print().
| void MachineConstantPool::dump | ( | ) | const |
dump - Call print(cerr) to be called from the debugger.
Definition at line 568 of file MachineFunction.cpp.
References llvm::errs(), llvm::raw_ostream::flush(), and print().