LLVM API Documentation


Public Member Functions | |
| ELFCodeEmitter (ELFWriter &ew) | |
| void | startFunction (MachineFunction &F) |
| bool | finishFunction (MachineFunction &F) |
| void | addRelocation (const MachineRelocation &MR) |
| virtual void | StartMachineBasicBlock (MachineBasicBlock *MBB) |
| virtual intptr_t | getConstantPoolEntryAddress (unsigned Index) const |
| FIXME: These should all be handled with relocations! | |
| virtual intptr_t | getJumpTableEntryAddress (unsigned Index) const |
| virtual intptr_t | getMachineBasicBlockAddress (MachineBasicBlock *MBB) const |
| virtual intptr_t | getLabelAddress (uint64_t Label) const |
| virtual void | emitLabel (uint64_t LabelID) |
| emitLabel - Emits a label | |
| virtual void | setModuleInfo (llvm::MachineModuleInfo *MMI) |
| void | startFunctionStub (const GlobalValue *F, unsigned StubSize, unsigned Alignment=1) |
| JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE! | |
| void * | finishFunctionStub (const GlobalValue *F) |
Definition at line 69 of file ELFWriter.cpp.
| llvm::ELFCodeEmitter::ELFCodeEmitter | ( | ELFWriter & | ew | ) | [inline, explicit] |
Definition at line 76 of file ELFWriter.cpp.
| void ELFCodeEmitter::startFunction | ( | MachineFunction & | F | ) | [virtual] |
startFunction - This callback is invoked when a new machine function is about to be emitted.
Implements llvm::MachineCodeEmitter.
Definition at line 133 of file ELFWriter.cpp.
References Align, llvm::cerr(), llvm::TargetData::getPointerSizeInBits(), llvm::ELFWriter::getSection(), llvm::TargetMachine::getTargetData(), llvm::TargetData::isLittleEndian(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_EXECINSTR, and llvm::ELF::SHT_PROGBITS.
| bool ELFCodeEmitter::finishFunction | ( | MachineFunction & | F | ) | [virtual] |
finishFunction - This callback is invoked after the function is completely finished.
Implements llvm::MachineCodeEmitter.
Definition at line 160 of file ELFWriter.cpp.
References llvm::GlobalValue::ExternalLinkage, llvm::MachineFunction::getFunction(), llvm::GlobalValue::getLinkage(), llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::LinkOnceLinkage, llvm::ELF::STB_GLOBAL, llvm::ELF::STB_LOCAL, llvm::ELF::STB_WEAK, llvm::ELF::STT_FUNC, llvm::ELFWriter::SymbolTable, and llvm::GlobalValue::WeakLinkage.
| void llvm::ELFCodeEmitter::addRelocation | ( | const MachineRelocation & | MR | ) | [inline, virtual] |
addRelocation - Whenever a relocatable address is needed, it should be noted with this interface.
Implements llvm::MachineCodeEmitter.
Definition at line 81 of file ELFWriter.cpp.
| virtual void llvm::ELFCodeEmitter::StartMachineBasicBlock | ( | MachineBasicBlock * | MBB | ) | [inline, virtual] |
StartMachineBasicBlock - This should be called by the target when a new basic block is about to be emitted. This way the MCE knows where the start of the block is, and can implement getMachineBasicBlockAddress.
Implements llvm::MachineCodeEmitter.
Definition at line 85 of file ELFWriter.cpp.
| virtual intptr_t llvm::ELFCodeEmitter::getConstantPoolEntryAddress | ( | unsigned | Index | ) | const [inline, virtual] |
FIXME: These should all be handled with relocations!
getConstantPoolEntryAddress - Return the address of the 'Index' entry in the constant pool that was last emitted with the emitConstantPool method.
Implements llvm::MachineCodeEmitter.
Definition at line 88 of file ELFWriter.cpp.
| virtual intptr_t llvm::ELFCodeEmitter::getJumpTableEntryAddress | ( | unsigned | Index | ) | const [inline, virtual] |
getJumpTableEntryAddress - Return the address of the jump table with index 'Index' in the function that last called initJumpTableInfo.
Implements llvm::MachineCodeEmitter.
Definition at line 92 of file ELFWriter.cpp.
| virtual intptr_t llvm::ELFCodeEmitter::getMachineBasicBlockAddress | ( | MachineBasicBlock * | MBB | ) | const [inline, virtual] |
getMachineBasicBlockAddress - Return the address of the specified MachineBasicBlock, only usable after the label for the MBB has been emitted.
Implements llvm::MachineCodeEmitter.
Definition at line 97 of file ELFWriter.cpp.
| virtual intptr_t llvm::ELFCodeEmitter::getLabelAddress | ( | uint64_t | LabelID | ) | const [inline, virtual] |
getLabelAddress - Return the address of the specified LabelID, only usable after the LabelID has been emitted.
Implements llvm::MachineCodeEmitter.
Definition at line 102 of file ELFWriter.cpp.
| virtual void llvm::ELFCodeEmitter::emitLabel | ( | uint64_t | LabelID | ) | [inline, virtual] |
emitLabel - Emits a label
Implements llvm::MachineCodeEmitter.
Definition at line 108 of file ELFWriter.cpp.
| virtual void llvm::ELFCodeEmitter::setModuleInfo | ( | llvm::MachineModuleInfo * | Info | ) | [inline, virtual] |
Specifies the MachineModuleInfo object. This is used for exception handling purposes.
Implements llvm::MachineCodeEmitter.
Definition at line 114 of file ELFWriter.cpp.
| void llvm::ELFCodeEmitter::startFunctionStub | ( | const GlobalValue * | F, | |
| unsigned | StubSize, | |||
| unsigned | Alignment = 1 | |||
| ) | [inline, virtual] |
JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!
Implements llvm::MachineCodeEmitter.
Definition at line 118 of file ELFWriter.cpp.
| void* llvm::ELFCodeEmitter::finishFunctionStub | ( | const GlobalValue * | F | ) | [inline, virtual] |
finishFunctionStub - This callback is invoked to terminate a function stub.
Implements llvm::MachineCodeEmitter.
Definition at line 123 of file ELFWriter.cpp.