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) |
Definition at line 30 of file TargetJITInfo.h.
|
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. |
|
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. |
|
Definition at line 32 of file TargetJITInfo.h. |
|
addPassesToJITCompile - Add passes to the specified pass manager to implement a fast code generator for this target. Implemented in llvm::PowerPCJITInfo, llvm::SkeletonJITInfo, llvm::SparcV9JITInfo, and llvm::X86JITInfo. |
|
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::PPC32JITInfo, llvm::SparcV9JITInfo, and llvm::X86JITInfo. Definition at line 49 of file TargetJITInfo.h. |
|
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. |
|
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::PPC32JITInfo, llvm::SparcV9JITInfo, and llvm::X86JITInfo. Definition at line 79 of file TargetJITInfo.h. |
|
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::PPC32JITInfo, llvm::PPC64JITInfo, llvm::SkeletonJITInfo, llvm::SparcV9JITInfo, and llvm::X86JITInfo. Referenced by llvm::JIT::recompileAndRelinkFunction(). |