LLVM API Documentation
#include <ARMJITInfo.h>
Public Member Functions | |
| ARMJITInfo () | |
| virtual void | replaceMachineCodeForFunction (void *Old, void *New) |
| virtual void * | emitGlobalValueIndirectSym (const GlobalValue *GV, void *ptr, MachineCodeEmitter &MCE) |
| virtual void * | emitFunctionStub (const Function *F, void *Fn, MachineCodeEmitter &MCE) |
| virtual LazyResolverFn | getLazyResolverFunction (JITCompilerFn) |
| getLazyResolverFunction - Expose the lazy resolver to the JIT. | |
| virtual void | relocate (void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char *GOTBase) |
| virtual bool | hasCustomConstantPool () const |
| virtual bool | hasCustomJumpTables () const |
| virtual bool | allocateSeparateGVMemory () const |
| void | Initialize (const MachineFunction &MF, bool isPIC) |
| intptr_t | getConstantPoolEntryAddr (unsigned CPI) const |
| void | addConstantPoolEntryAddr (unsigned CPI, intptr_t Addr) |
| intptr_t | getJumpTableBaseAddr (unsigned JTI) const |
| void | addJumpTableBaseAddr (unsigned JTI, intptr_t Addr) |
| intptr_t | getPCLabelAddr (unsigned Id) const |
| getPCLabelAddr - Retrieve the address of the PC label of the specified id. | |
| void | addPCLabelAddr (unsigned Id, intptr_t Addr) |
| addPCLabelAddr - Remember the address of the specified PC label. | |
| intptr_t | getIndirectSymAddr (void *Addr) const |
| void | addIndirectSymAddr (void *SymAddr, intptr_t IndSymAddr) |
Definition at line 28 of file ARMJITInfo.h.
| llvm::ARMJITInfo::ARMJITInfo | ( | ) | [inline, explicit] |
| void ARMJITInfo::replaceMachineCodeForFunction | ( | void * | Old, | |
| void * | New | |||
| ) | [virtual] |
replaceMachineCodeForFunction - Make it so that calling the function whose machine code is at OLD turns into a call to NEW, perhaps by overwriting OLD with a branch to NEW. This is used for self-modifying code.
Implements llvm::TargetJITInfo.
Definition at line 29 of file ARMJITInfo.cpp.
| void * ARMJITInfo::emitGlobalValueIndirectSym | ( | const GlobalValue * | GV, | |
| void * | ptr, | |||
| MachineCodeEmitter & | MCE | |||
| ) | [virtual] |
emitGlobalValueIndirectSym - Use the specified MachineCodeEmitter object to emit an indirect symbol which contains the address of the specified ptr.
Reimplemented from llvm::TargetJITInfo.
Definition at line 143 of file ARMJITInfo.cpp.
References addIndirectSymAddr(), llvm::MachineCodeEmitter::emitWordLE(), llvm::MachineCodeEmitter::finishGVStub(), and llvm::MachineCodeEmitter::startGVStub().
Referenced by emitFunctionStub().
| void * ARMJITInfo::emitFunctionStub | ( | const Function * | F, | |
| void * | Fn, | |||
| MachineCodeEmitter & | MCE | |||
| ) | [virtual] |
emitFunctionStub - Use the specified MachineCodeEmitter object to emit a small native function that simply calls the function at the specified address.
Reimplemented from llvm::TargetJITInfo.
Definition at line 152 of file ARMJITInfo.cpp.
References ARMCompilationCallback(), DOUT, emitGlobalValueIndirectSym(), llvm::MachineCodeEmitter::emitWordLE(), llvm::MachineCodeEmitter::finishGVStub(), llvm::MachineCodeEmitter::getCurrentPCValue(), getIndirectSymAddr(), llvm::Value::getName(), llvm::sys::Memory::InvalidateInstructionCache(), and llvm::MachineCodeEmitter::startGVStub().
| TargetJITInfo::LazyResolverFn ARMJITInfo::getLazyResolverFunction | ( | JITCompilerFn | F | ) | [virtual] |
getLazyResolverFunction - Expose the lazy resolver to the JIT.
Definition at line 138 of file ARMJITInfo.cpp.
References ARMCompilationCallback(), and JITCompilerFunction.
| void ARMJITInfo::relocate | ( | void * | Function, | |
| MachineRelocation * | MR, | |||
| unsigned | NumRelocs, | |||
| unsigned char * | GOTBase | |||
| ) | [virtual] |
relocate - Before the JIT can run a block of code that has been emitted, it must rewrite the code to contain the actual addresses of any referenced global symbols.
relocate - Before the JIT can run a block of code that has been emitted, it must rewrite the code to contain the actual addresses of any referenced global symbols.
Reimplemented from llvm::TargetJITInfo.
Definition at line 241 of file ARMJITInfo.cpp.
References llvm::MachineRelocation::getMachineCodeOffset(), llvm::ARMRegisterInfo::getRegisterNumbering(), llvm::MachineRelocation::getRelocationType(), llvm::ARMII::RegRnShift, llvm::ARM::reloc_arm_absolute, llvm::ARM::reloc_arm_branch, llvm::ARM::reloc_arm_cp_entry, llvm::ARM::reloc_arm_jt_base, llvm::ARM::reloc_arm_machine_cp_entry, llvm::ARM::reloc_arm_pic_jt, llvm::ARM::reloc_arm_relative, llvm::ARM::reloc_arm_vfp_cp_entry, and llvm::ARMII::U_BitShift.
| virtual bool llvm::ARMJITInfo::hasCustomConstantPool | ( | ) | const [inline, virtual] |
hasCustomConstantPool - Allows a target to specify that constant pool address resolution is handled by the target.
Reimplemented from llvm::TargetJITInfo.
Definition at line 81 of file ARMJITInfo.h.
| virtual bool llvm::ARMJITInfo::hasCustomJumpTables | ( | ) | const [inline, virtual] |
hasCustomJumpTables - Allows a target to specify that jumptables are emitted by the target.
Reimplemented from llvm::TargetJITInfo.
Definition at line 85 of file ARMJITInfo.h.
| virtual bool llvm::ARMJITInfo::allocateSeparateGVMemory | ( | ) | const [inline, virtual] |
allocateSeparateGVMemory - If true, globals should be placed in separately allocated heap memory rather than in the same code memory allocated by MachineCodeEmitter.
Reimplemented from llvm::TargetJITInfo.
Definition at line 90 of file ARMJITInfo.h.
| void llvm::ARMJITInfo::Initialize | ( | const MachineFunction & | MF, | |
| bool | isPIC | |||
| ) | [inline] |
Initialize - Initialize internal stage for the function being JITted. Resize constant pool ids to CONSTPOOL_ENTRY addresses map; resize jump table ids to jump table bases map; remember if codegen relocation model is PIC.
Definition at line 102 of file ARMJITInfo.h.
References AFI, llvm::MachineFunction::getInfo(), llvm::ARMFunctionInfo::getNumConstPoolEntries(), llvm::ARMFunctionInfo::getNumJumpTables(), and llvm::SmallVectorImpl< T >::resize().
| intptr_t llvm::ARMJITInfo::getConstantPoolEntryAddr | ( | unsigned | CPI | ) | const [inline] |
getConstantPoolEntryAddr - The ARM target puts all constant pool entries into constant islands. This returns the address of the constant pool entry of the specified index.
Definition at line 112 of file ARMJITInfo.h.
References llvm::SmallVectorImpl< T >::size().
| void llvm::ARMJITInfo::addConstantPoolEntryAddr | ( | unsigned | CPI, | |
| intptr_t | Addr | |||
| ) | [inline] |
addConstantPoolEntryAddr - Map a Constant Pool Index to the address where its associated value is stored. When relocations are processed, this value will be used to resolve references to the constant.
Definition at line 120 of file ARMJITInfo.h.
References llvm::SmallVectorImpl< T >::size().
| intptr_t llvm::ARMJITInfo::getJumpTableBaseAddr | ( | unsigned | JTI | ) | const [inline] |
getJumpTableBaseAddr - The ARM target inline all jump tables within text section of the function. This returns the address of the base of the jump table of the specified index.
Definition at line 128 of file ARMJITInfo.h.
References llvm::SmallVectorImpl< T >::size().
| void llvm::ARMJITInfo::addJumpTableBaseAddr | ( | unsigned | JTI, | |
| intptr_t | Addr | |||
| ) | [inline] |
addJumpTableBaseAddr - Map a jump table index to the address where the corresponding inline jump table is emitted. When relocations are processed, this value will be used to resolve references to the jump table.
Definition at line 137 of file ARMJITInfo.h.
References llvm::SmallVectorImpl< T >::size().
| intptr_t llvm::ARMJITInfo::getPCLabelAddr | ( | unsigned | Id | ) | const [inline] |
getPCLabelAddr - Retrieve the address of the PC label of the specified id.
Definition at line 143 of file ARMJITInfo.h.
References llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::end(), and llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::find().
| void llvm::ARMJITInfo::addPCLabelAddr | ( | unsigned | Id, | |
| intptr_t | Addr | |||
| ) | [inline] |
addPCLabelAddr - Remember the address of the specified PC label.
Definition at line 150 of file ARMJITInfo.h.
References llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::insert().
| intptr_t llvm::ARMJITInfo::getIndirectSymAddr | ( | void * | Addr | ) | const [inline] |
getIndirectSymAddr - Retrieve the address of the indirect symbol of the specified symbol located at address. Returns 0 if the indirect symbol has not been emitted.
Definition at line 157 of file ARMJITInfo.h.
References llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::end(), and llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::find().
Referenced by emitFunctionStub().
| void llvm::ARMJITInfo::addIndirectSymAddr | ( | void * | SymAddr, | |
| intptr_t | IndSymAddr | |||
| ) | [inline] |
addIndirectSymAddr - Add a mapping from address of an emitted symbol to its indirect symbol address.
Definition at line 166 of file ARMJITInfo.h.
References llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::insert().
Referenced by emitGlobalValueIndirectSym().