LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::TargetJITInfo Class Reference

#include <TargetJITInfo.h>

Inheritance diagram for llvm::TargetJITInfo:

Inheritance graph
[legend]
List of all members.

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)

Detailed Description

TargetJITInfo - Target specific information required by the Just-In-Time code generator.

Definition at line 30 of file TargetJITInfo.h.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

virtual llvm::TargetJITInfo::~TargetJITInfo  )  [inline, virtual]
 

Definition at line 32 of file TargetJITInfo.h.


Member Function Documentation

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::PowerPCJITInfo, llvm::SkeletonJITInfo, 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::PPC32JITInfo, 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.

virtual void llvm::TargetJITInfo::relocate void *  Function,
MachineRelocation MR,
unsigned  NumRelocs
[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::PPC32JITInfo, 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::PPC32JITInfo, llvm::PPC64JITInfo, llvm::SkeletonJITInfo, llvm::SparcV9JITInfo, and llvm::X86JITInfo.

Referenced by llvm::JIT::recompileAndRelinkFunction().


The documentation for this class was generated from the following file: