LLVM API Documentation
#include <TargetJITInfo.h>
Inheritance diagram for llvm::TargetJITInfo:
Public Types | |
typedef void(*) | LazyResolverFn () |
typedef void *(*) | JITCompilerFn (void *) |
Public Member Functions | |
virtual | ~TargetJITInfo () |
virtual void | addPassesToJITCompile (FunctionPassManager &PM)=0 |
virtual void | replaceMachineCodeForFunction (void *Old, void *New)=0 |
virtual void * | emitFunctionStub (void *Fn, MachineCodeEmitter &MCE) |
virtual LazyResolverFn | getLazyResolverFunction (JITCompilerFn) |
virtual void | relocate (void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char *GOTBase) |
bool | needsGOT () const |
needsGOT - Allows a target to specify that it would like the | |
Protected Attributes | |
bool | useGOT |
Definition at line 30 of file TargetJITInfo.h.
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.
Definition at line 65 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.
Definition at line 58 of file TargetJITInfo.h.
virtual llvm::TargetJITInfo::~TargetJITInfo | ( | ) | [inline, virtual] |
Definition at line 32 of file TargetJITInfo.h.
virtual void llvm::TargetJITInfo::addPassesToJITCompile | ( | FunctionPassManager & | PM | ) | [pure virtual] |
addPassesToJITCompile - Add passes to the specified pass manager to implement a fast code generator for this target.
Implemented in llvm::AlphaJITInfo, llvm::PPCJITInfo, llvm::SparcV9JITInfo, and llvm::X86JITInfo.
virtual void* llvm::TargetJITInfo::emitFunctionStub | ( | 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::PPCJITInfo, llvm::SparcV9JITInfo, and llvm::X86JITInfo.
Definition at line 49 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 71 of file TargetJITInfo.h.
bool llvm::TargetJITInfo::needsGOT | ( | ) | const [inline] |
needsGOT - Allows a target to specify that it would like the
Definition at line 86 of file TargetJITInfo.h.
References useGOT.
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::PPCJITInfo, llvm::SparcV9JITInfo, and llvm::X86JITInfo.
Definition at line 79 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::PPCJITInfo, llvm::SparcV9JITInfo, and llvm::X86JITInfo.
Referenced by llvm::JIT::recompileAndRelinkFunction().
bool llvm::TargetJITInfo::useGOT [protected] |
Definition at line 89 of file TargetJITInfo.h.
Referenced by llvm::AlphaJITInfo::AlphaJITInfo(), needsGOT(), llvm::PPCJITInfo::PPCJITInfo(), llvm::SparcV9JITInfo::SparcV9JITInfo(), and llvm::X86JITInfo::X86JITInfo().