LLVM
8.0.1
|
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. More... | |
~MachineConstantPool () | |
unsigned | getConstantPoolAlignment () const |
getConstantPoolAlignment - Return the alignment required by the whole constant pool, of which the first element must be aligned. More... | |
unsigned | getConstantPoolIndex (const Constant *C, unsigned Alignment) |
getConstantPoolIndex - Create a new entry in the constant pool or return an existing one. More... | |
unsigned | getConstantPoolIndex (MachineConstantPoolValue *V, unsigned Alignment) |
bool | isEmpty () const |
isEmpty - Return true if this constant pool contains no constants. More... | |
const std::vector< MachineConstantPoolEntry > & | getConstants () const |
void | print (raw_ostream &OS) const |
print - Used by the MachineFunction printer to print information about constant pool objects. More... | |
void | dump () const |
dump - Call print(cerr) to be called from the debugger. More... | |
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 121 of file MachineConstantPool.h.
|
inlineexplicit |
The only constructor.
Definition at line 132 of file MachineConstantPool.h.
MachineConstantPool::~MachineConstantPool | ( | ) |
Definition at line 943 of file MachineFunction.cpp.
References llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::count(), Deleted, E, I, and llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert().
LLVM_DUMP_METHOD void MachineConstantPool::dump | ( | ) | const |
dump - Call print(cerr) to be called from the debugger.
Definition at line 1059 of file MachineFunction.cpp.
References llvm::dbgs(), and llvm::MachineFunction::print().
|
inline |
getConstantPoolAlignment - Return the alignment required by the whole constant pool, of which the first element must be aligned.
Definition at line 138 of file MachineConstantPool.h.
References C.
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 1005 of file MachineFunction.cpp.
References assert(), and CanShareConstantPoolEntry().
Referenced by addExclusiveRegPair(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), canTurnIntoCOPY(), duplicateCPV(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), emitPostSt(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::MIRParserImpl::initializeConstantPool(), llvm::XCoreInstrInfo::loadImmediate(), and llvm::ARMTargetLowering::ReplaceNodeResults().
unsigned MachineConstantPool::getConstantPoolIndex | ( | MachineConstantPoolValue * | V, |
unsigned | Alignment | ||
) |
Definition at line 1025 of file MachineFunction.cpp.
References assert(), and llvm::MachineConstantPoolValue::getExistingMachineCPValue().
|
inline |
Definition at line 150 of file MachineConstantPool.h.
References llvm::dump(), and llvm::MachineConstantPoolValue::print().
Referenced by llvm::MIRPrinter::convert(), duplicateCPV(), llvm::WebAssemblyAsmPrinter::EmitConstantPool(), llvm::AsmPrinter::EmitConstantPool(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitJumpTableTBInst(), getConstantFromPool(), llvm::AsmPrinter::GetCPISymbol(), llvm::SystemZConstantPoolValue::getExistingMachineCPValue(), llvm::ARMConstantPoolValue::getExistingMachineCPValueImpl(), and llvm::ARMBaseInstrInfo::produceSameValue().
|
inline |
isEmpty - Return true if this constant pool contains no constants.
Definition at line 148 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 1043 of file MachineFunction.cpp.