LLVM API Documentation
#include <TargetJITInfo.h>


Public Types | |
| typedef void(* | LazyResolverFn )() |
| typedef void *(* | JITCompilerFn )(void *) |
Public Member Functions | |
| virtual | ~TargetJITInfo () |
| virtual void | replaceMachineCodeForFunction (void *Old, void *New)=0 |
| virtual void * | emitGlobalValueIndirectSym (const GlobalValue *GV, void *ptr, MachineCodeEmitter &MCE) |
| virtual void * | emitFunctionStub (const Function *F, void *Fn, MachineCodeEmitter &MCE) |
| virtual uintptr_t | getPICJumpTableEntry (uintptr_t BB, uintptr_t JTBase) |
| virtual LazyResolverFn | getLazyResolverFunction (JITCompilerFn) |
| virtual void | relocate (void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char *GOTBase) |
| virtual char * | allocateThreadLocalMemory (size_t size) |
| bool | needsGOT () const |
| needsGOT - Allows a target to specify that it would like the | |
| virtual bool | hasCustomConstantPool () const |
| virtual bool | hasCustomJumpTables () const |
| virtual bool | allocateSeparateGVMemory () const |
Protected Attributes | |
| bool | useGOT |
Definition at line 31 of file TargetJITInfo.h.
| typedef void(* llvm::TargetJITInfo::LazyResolverFn)() |
LazyResolverFn - This typedef is used to represent the function that unresolved call points should invoke. This is a target specific function that knows how to walk the stack and find out which stub the call is coming from.
| typedef void*(* llvm::TargetJITInfo::JITCompilerFn)(void *) |
JITCompilerFn - This typedef is used to represent the JIT function that lazily compiles the function corresponding to a stub. The JIT keeps track of the mapping between stubs and LLVM Functions, the target provides the ability to figure out the address of a stub that is called by the LazyResolverFn.
| virtual llvm::TargetJITInfo::~TargetJITInfo | ( | ) | [inline, virtual] |
Definition at line 33 of file TargetJITInfo.h.
| virtual void llvm::TargetJITInfo::replaceMachineCodeForFunction | ( | void * | Old, | |
| void * | New | |||
| ) | [pure 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.
Implemented in llvm::AlphaJITInfo, llvm::ARMJITInfo, llvm::PPCJITInfo, and llvm::X86JITInfo.
Referenced by llvm::JIT::recompileAndRelinkFunction().
| virtual void* llvm::TargetJITInfo::emitGlobalValueIndirectSym | ( | const GlobalValue * | GV, | |
| void * | ptr, | |||
| MachineCodeEmitter & | MCE | |||
| ) | [inline, virtual] |
emitGlobalValueIndirectSym - Use the specified MachineCodeEmitter object to emit an indirect symbol which contains the address of the specified ptr.
Reimplemented in llvm::ARMJITInfo, and llvm::X86JITInfo.
Definition at line 45 of file TargetJITInfo.h.
| virtual void* llvm::TargetJITInfo::emitFunctionStub | ( | const Function * | F, | |
| void * | Fn, | |||
| MachineCodeEmitter & | MCE | |||
| ) | [inline, virtual] |
emitFunctionStub - Use the specified MachineCodeEmitter object to emit a small native function that simply calls the function at the specified address. Return the address of the resultant function.
Reimplemented in llvm::AlphaJITInfo, llvm::ARMJITInfo, llvm::PPCJITInfo, and llvm::X86JITInfo.
Definition at line 54 of file TargetJITInfo.h.
| virtual uintptr_t llvm::TargetJITInfo::getPICJumpTableEntry | ( | uintptr_t | BB, | |
| uintptr_t | JTBase | |||
| ) | [inline, virtual] |
getPICJumpTableEntry - Returns the value of the jumptable entry for the specific basic block.
Reimplemented in llvm::X86JITInfo.
Definition at line 62 of file TargetJITInfo.h.
| virtual LazyResolverFn llvm::TargetJITInfo::getLazyResolverFunction | ( | JITCompilerFn | ) | [inline, virtual] |
getLazyResolverFunction - This method is used to initialize the JIT, giving the target the function that should be used to compile a function, and giving the JIT the target function used to do the lazy resolving.
Definition at line 84 of file TargetJITInfo.h.
| virtual void llvm::TargetJITInfo::relocate | ( | void * | Function, | |
| MachineRelocation * | MR, | |||
| unsigned | NumRelocs, | |||
| unsigned char * | GOTBase | |||
| ) | [inline, 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.
Reimplemented in llvm::AlphaJITInfo, llvm::ARMJITInfo, llvm::PPCJITInfo, and llvm::X86JITInfo.
Definition at line 92 of file TargetJITInfo.h.
| virtual char* llvm::TargetJITInfo::allocateThreadLocalMemory | ( | size_t | size | ) | [inline, virtual] |
allocateThreadLocalMemory - Each target has its own way of handling thread local variables. This method returns a value only meaningful to the target.
Reimplemented in llvm::X86JITInfo.
Definition at line 101 of file TargetJITInfo.h.
Referenced by llvm::JIT::getMemoryForGV(), and llvm::JIT::getOrEmitGlobalVariable().
| bool llvm::TargetJITInfo::needsGOT | ( | ) | const [inline] |
needsGOT - Allows a target to specify that it would like the
Definition at line 108 of file TargetJITInfo.h.
References useGOT.
| virtual bool llvm::TargetJITInfo::hasCustomConstantPool | ( | ) | const [inline, virtual] |
hasCustomConstantPool - Allows a target to specify that constant pool address resolution is handled by the target.
Reimplemented in llvm::ARMJITInfo.
Definition at line 112 of file TargetJITInfo.h.
| virtual bool llvm::TargetJITInfo::hasCustomJumpTables | ( | ) | const [inline, virtual] |
hasCustomJumpTables - Allows a target to specify that jumptables are emitted by the target.
Reimplemented in llvm::ARMJITInfo.
Definition at line 116 of file TargetJITInfo.h.
| virtual bool llvm::TargetJITInfo::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 in llvm::ARMJITInfo.
Definition at line 121 of file TargetJITInfo.h.
Referenced by llvm::JIT::getOrEmitGlobalVariable().
bool llvm::TargetJITInfo::useGOT [protected] |
Definition at line 123 of file TargetJITInfo.h.
Referenced by llvm::AlphaJITInfo::AlphaJITInfo(), llvm::ARMJITInfo::ARMJITInfo(), needsGOT(), llvm::PPCJITInfo::PPCJITInfo(), and llvm::X86JITInfo::X86JITInfo().
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.