LLVM  6.0.0svn
Classes | Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
llvm::orc::JITCompileCallbackManager Class Referenceabstract

Target-independent base class for compile callback management. More...

#include "llvm/ExecutionEngine/Orc/IndirectionUtils.h"

Inheritance diagram for llvm::orc::JITCompileCallbackManager:
Inheritance graph
[legend]
Collaboration diagram for llvm::orc::JITCompileCallbackManager:
Collaboration graph
[legend]

Classes

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

Public Types

using CompileFtor = std::function< JITTargetAddress()>
 

Public Member Functions

 JITCompileCallbackManager (JITTargetAddress ErrorHandlerAddress)
 Construct a JITCompileCallbackManager. More...
 
virtual ~JITCompileCallbackManager ()=default
 
JITTargetAddress executeCompileCallback (JITTargetAddress TrampolineAddr)
 Execute the callback for the given trampoline id. More...
 
Expected< CompileCallbackInfogetCompileCallback ()
 Reserve a compile callback. More...
 
CompileCallbackInfo getCompileCallbackInfo (JITTargetAddress TrampolineAddr)
 Get a CompileCallbackInfo for an existing callback. More...
 
void releaseCompileCallback (JITTargetAddress TrampolineAddr)
 Release a compile callback. More...
 

Protected Types

using TrampolineMapT = std::map< JITTargetAddress, CompileFtor >
 

Protected Attributes

JITTargetAddress ErrorHandlerAddress
 
TrampolineMapT ActiveTrampolines
 
std::vector< JITTargetAddressAvailableTrampolines
 

Detailed Description

Target-independent base class for compile callback management.

Definition at line 50 of file IndirectionUtils.h.

Member Typedef Documentation

◆ CompileFtor

Definition at line 52 of file IndirectionUtils.h.

◆ TrampolineMapT

Definition at line 139 of file IndirectionUtils.h.

Constructor & Destructor Documentation

◆ JITCompileCallbackManager()

llvm::orc::JITCompileCallbackManager::JITCompileCallbackManager ( JITTargetAddress  ErrorHandlerAddress)
inline

Construct a JITCompileCallbackManager.

Parameters
ErrorHandlerAddressThe address of an error handler in the target process to be used if a compile callback fails.

Definition at line 75 of file IndirectionUtils.h.

References ~JITCompileCallbackManager().

◆ ~JITCompileCallbackManager()

virtual llvm::orc::JITCompileCallbackManager::~JITCompileCallbackManager ( )
virtualdefault

Member Function Documentation

◆ executeCompileCallback()

JITTargetAddress llvm::orc::JITCompileCallbackManager::executeCompileCallback ( JITTargetAddress  TrampolineAddr)
inline

Execute the callback for the given trampoline id.

Called by the JIT to compile functions on demand.

Definition at line 82 of file IndirectionUtils.h.

References ActiveTrampolines, AvailableTrampolines, ErrorHandlerAddress, and I.

Referenced by llvm::orc::LocalJITCompileCallbackManager< TargetT >::LocalJITCompileCallbackManager().

◆ getCompileCallback()

Expected<CompileCallbackInfo> llvm::orc::JITCompileCallbackManager::getCompileCallback ( )
inline

◆ getCompileCallbackInfo()

CompileCallbackInfo llvm::orc::JITCompileCallbackManager::getCompileCallbackInfo ( JITTargetAddress  TrampolineAddr)
inline

◆ releaseCompileCallback()

void llvm::orc::JITCompileCallbackManager::releaseCompileCallback ( JITTargetAddress  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 129 of file IndirectionUtils.h.

References ActiveTrampolines, assert(), AvailableTrampolines, and I.

Member Data Documentation

◆ ActiveTrampolines

TrampolineMapT llvm::orc::JITCompileCallbackManager::ActiveTrampolines
protected

◆ AvailableTrampolines

std::vector<JITTargetAddress> llvm::orc::JITCompileCallbackManager::AvailableTrampolines
protected

◆ ErrorHandlerAddress

JITTargetAddress llvm::orc::JITCompileCallbackManager::ErrorHandlerAddress
protected

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