LLVM API Documentation
The machine constant pool. More...
#include <MachineConstantPool.h>
Public Member Functions | |
MachineConstantPool (const TargetMachine &TM) | |
The only constructor. | |
~MachineConstantPool () | |
unsigned | getConstantPoolAlignment () const |
unsigned | getConstantPoolIndex (const 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 machine constant pool.
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 137 of file MachineConstantPool.h.
llvm::MachineConstantPool::MachineConstantPool | ( | const TargetMachine & | TM | ) | [inline, explicit] |
The only constructor.
Definition at line 147 of file MachineConstantPool.h.
Definition at line 876 of file MachineFunction.cpp.
References llvm::DenseSet< ValueT, ValueInfoT >::begin(), llvm::DenseSet< ValueT, ValueInfoT >::end(), and I.
void MachineConstantPool::dump | ( | ) | const |
dump - Call print(cerr) to be called from the debugger.
Definition at line 988 of file MachineFunction.cpp.
References llvm::dbgs(), and print().
unsigned llvm::MachineConstantPool::getConstantPoolAlignment | ( | ) | const [inline] |
getConstantPoolAlignment - Return the alignment required by the whole constant pool, of which the first element must be aligned.
Definition at line 153 of file MachineConstantPool.h.
unsigned MachineConstantPool::getConstantPoolIndex | ( | const Constant * | C, |
unsigned | Alignment | ||
) |
getConstantPoolIndex - Create a new entry in the constant pool or return an existing one. User must specify 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 933 of file MachineFunction.cpp.
References CanShareConstantPoolEntry().
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), duplicateCPV(), llvm::Thumb2RegisterInfo::emitLoadConstPool(), llvm::Thumb1RegisterInfo::emitLoadConstPool(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), and llvm::XCoreInstrInfo::loadImmediate().
unsigned MachineConstantPool::getConstantPoolIndex | ( | MachineConstantPoolValue * | V, |
unsigned | Alignment | ||
) |
Definition at line 954 of file MachineFunction.cpp.
References llvm::MachineConstantPoolValue::getExistingMachineCPValue(), and llvm::DenseSet< ValueT, ValueInfoT >::insert().
const std::vector<MachineConstantPoolEntry>& llvm::MachineConstantPool::getConstants | ( | ) | const [inline] |
Definition at line 164 of file MachineConstantPool.h.
Referenced by duplicateCPV(), llvm::AsmPrinter::EmitConstantPool(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::X86AsmPrinter::GetCPISymbol(), llvm::SystemZConstantPoolValue::getExistingMachineCPValue(), llvm::ARMConstantPoolValue::getExistingMachineCPValueImpl(), and llvm::ARMBaseInstrInfo::produceSameValue().
bool llvm::MachineConstantPool::isEmpty | ( | ) | const [inline] |
isEmpty - Return true if this constant pool contains no constants.
Definition at line 162 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 972 of file MachineFunction.cpp.
Referenced by dump().