LLVM  3.7.0
Classes | Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
llvm::orc::JITCompileCallbackManagerBase Class Referenceabstract

Base class for JITLayer independent aspects of JITCompileCallbackManager. More...

#include <IndirectionUtils.h>

Inheritance diagram for llvm::orc::JITCompileCallbackManagerBase:
[legend]
Collaboration diagram for llvm::orc::JITCompileCallbackManagerBase:
[legend]

Classes

class  CompileCallbackInfo
 Handle to a newly created compile callback. More...
 

Public Types

typedef std::function
< TargetAddress()> 
CompileFtor
 

Public Member Functions

 JITCompileCallbackManagerBase (TargetAddress ErrorHandlerAddress, unsigned NumTrampolinesPerBlock)
 Construct a JITCompileCallbackManagerBase. More...
 
virtual ~JITCompileCallbackManagerBase ()
 
TargetAddress executeCompileCallback (TargetAddress TrampolineAddr)
 Execute the callback for the given trampoline id. More...
 
virtual CompileCallbackInfo getCompileCallback (LLVMContext &Context)=0
 Reserve a compile callback. More...
 
CompileCallbackInfo getCompileCallbackInfo (TargetAddress TrampolineAddr)
 Get a CompileCallbackInfo for an existing callback. More...
 
void releaseCompileCallback (TargetAddress TrampolineAddr)
 Release a compile callback. More...
 

Protected Types

typedef std::map
< TargetAddress, CompileFtor
TrampolineMapT
 

Protected Attributes

TargetAddress ErrorHandlerAddress
 
unsigned NumTrampolinesPerBlock
 
TrampolineMapT ActiveTrampolines
 
std::vector< TargetAddressAvailableTrampolines
 

Detailed Description

Base class for JITLayer independent aspects of JITCompileCallbackManager.

Definition at line 32 of file IndirectionUtils.h.

Member Typedef Documentation

Definition at line 35 of file IndirectionUtils.h.

Definition at line 118 of file IndirectionUtils.h.

Constructor & Destructor Documentation

llvm::orc::JITCompileCallbackManagerBase::JITCompileCallbackManagerBase ( TargetAddress  ErrorHandlerAddress,
unsigned  NumTrampolinesPerBlock 
)
inline

Construct a JITCompileCallbackManagerBase.

Parameters
ErrorHandlerAddressThe address of an error handler in the target process to be used if a compile callback fails.
NumTrampolinesPerBlockNumber of trampolines to emit if there is no available trampoline when getCompileCallback is called.

Definition at line 60 of file IndirectionUtils.h.

virtual llvm::orc::JITCompileCallbackManagerBase::~JITCompileCallbackManagerBase ( )
inlinevirtual

Definition at line 65 of file IndirectionUtils.h.

Member Function Documentation

TargetAddress llvm::orc::JITCompileCallbackManagerBase::executeCompileCallback ( TargetAddress  TrampolineAddr)
inline

Execute the callback for the given trampoline id.

Called by the JIT to compile functions on demand.

Definition at line 69 of file IndirectionUtils.h.

References ActiveTrampolines, AvailableTrampolines, ErrorHandlerAddress, and I.

virtual CompileCallbackInfo llvm::orc::JITCompileCallbackManagerBase::getCompileCallback ( LLVMContext Context)
pure virtual

Reserve a compile callback.

Implemented in llvm::orc::JITCompileCallbackManager< JITLayerT, TargetT >.

CompileCallbackInfo llvm::orc::JITCompileCallbackManagerBase::getCompileCallbackInfo ( TargetAddress  TrampolineAddr)
inline

Get a CompileCallbackInfo for an existing callback.

Definition at line 96 of file IndirectionUtils.h.

References ActiveTrampolines, and I.

void llvm::orc::JITCompileCallbackManagerBase::releaseCompileCallback ( TargetAddress  TrampolineAddr)
inline

Release a compile callback.

Note: Callbacks are auto-released after they execute. This method should only be called to manually release a callback that is not going to execute.

Definition at line 107 of file IndirectionUtils.h.

References ActiveTrampolines, AvailableTrampolines, and I.

Member Data Documentation

TrampolineMapT llvm::orc::JITCompileCallbackManagerBase::ActiveTrampolines
protected
std::vector<TargetAddress> llvm::orc::JITCompileCallbackManagerBase::AvailableTrampolines
protected

Definition at line 120 of file IndirectionUtils.h.

Referenced by executeCompileCallback(), and releaseCompileCallback().

TargetAddress llvm::orc::JITCompileCallbackManagerBase::ErrorHandlerAddress
protected

Definition at line 115 of file IndirectionUtils.h.

Referenced by executeCompileCallback().

unsigned llvm::orc::JITCompileCallbackManagerBase::NumTrampolinesPerBlock
protected

Definition at line 116 of file IndirectionUtils.h.


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