LLVM  3.7.0
Classes | Public Types | Public Member Functions | List of all members
llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, PartitioningFtor > Class Template Reference

Compile-on-demand layer. More...

#include <CompileOnDemandLayer.h>

Public Types

typedef LogicalDylibList::iterator ModuleSetHandleT
 Handle to a set of loaded modules. More...
 

Public Member Functions

 CompileOnDemandLayer (BaseLayerT &BaseLayer, CompileCallbackMgrT &CallbackMgr, bool CloneStubsIntoPartitions)
 Construct a compile-on-demand layer instance. More...
 
template<typename ModuleSetT , typename MemoryManagerPtrT , typename SymbolResolverPtrT >
ModuleSetHandleT addModuleSet (ModuleSetT Ms, MemoryManagerPtrT MemMgr, SymbolResolverPtrT Resolver)
 Add a module to the compile-on-demand layer. More...
 
void removeModuleSet (ModuleSetHandleT H)
 Remove the module represented by the given handle. More...
 
JITSymbol findSymbol (StringRef Name, bool ExportedSymbolsOnly)
 Search for the given named symbol. More...
 
JITSymbol findSymbolIn (ModuleSetHandleT H, const std::string &Name, bool ExportedSymbolsOnly)
 Get the address of a symbol provided by this layer, or some layer below this one. More...
 

Detailed Description

template<typename BaseLayerT, typename CompileCallbackMgrT, typename PartitioningFtor = std::function<std::set<Function*>(Function&)>>
class llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, PartitioningFtor >

Compile-on-demand layer.

When a module is added to this layer a stub is created for each of its function definitions. The stubs and other global values are immediately added to the layer below. When a stub is called it triggers the extraction of the function body from the original module. The extracted body is then compiled and executed.

Definition at line 42 of file CompileOnDemandLayer.h.

Member Typedef Documentation

template<typename BaseLayerT , typename CompileCallbackMgrT , typename PartitioningFtor = std::function<std::set<Function*>(Function&)>>
typedef LogicalDylibList::iterator llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, PartitioningFtor >::ModuleSetHandleT

Handle to a set of loaded modules.

Definition at line 99 of file CompileOnDemandLayer.h.

Constructor & Destructor Documentation

template<typename BaseLayerT , typename CompileCallbackMgrT , typename PartitioningFtor = std::function<std::set<Function*>(Function&)>>
llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, PartitioningFtor >::CompileOnDemandLayer ( BaseLayerT &  BaseLayer,
CompileCallbackMgrT &  CallbackMgr,
bool  CloneStubsIntoPartitions 
)
inline

Construct a compile-on-demand layer instance.

Definition at line 102 of file CompileOnDemandLayer.h.

Member Function Documentation

template<typename BaseLayerT , typename CompileCallbackMgrT , typename PartitioningFtor = std::function<std::set<Function*>(Function&)>>
template<typename ModuleSetT , typename MemoryManagerPtrT , typename SymbolResolverPtrT >
ModuleSetHandleT llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, PartitioningFtor >::addModuleSet ( ModuleSetT  Ms,
MemoryManagerPtrT  MemMgr,
SymbolResolverPtrT  Resolver 
)
inline

Add a module to the compile-on-demand layer.

Definition at line 110 of file CompileOnDemandLayer.h.

References F().

template<typename BaseLayerT , typename CompileCallbackMgrT , typename PartitioningFtor = std::function<std::set<Function*>(Function&)>>
JITSymbol llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, PartitioningFtor >::findSymbol ( StringRef  Name,
bool  ExportedSymbolsOnly 
)
inline

Search for the given named symbol.

Parameters
NameThe name of the symbol to search for.
ExportedSymbolsOnlyIf true, search only for exported symbols.
Returns
A handle for the given named symbol, if it exists.

Definition at line 152 of file CompileOnDemandLayer.h.

template<typename BaseLayerT , typename CompileCallbackMgrT , typename PartitioningFtor = std::function<std::set<Function*>(Function&)>>
JITSymbol llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, PartitioningFtor >::findSymbolIn ( ModuleSetHandleT  H,
const std::string &  Name,
bool  ExportedSymbolsOnly 
)
inline

Get the address of a symbol provided by this layer, or some layer below this one.

Definition at line 158 of file CompileOnDemandLayer.h.

template<typename BaseLayerT , typename CompileCallbackMgrT , typename PartitioningFtor = std::function<std::set<Function*>(Function&)>>
void llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, PartitioningFtor >::removeModuleSet ( ModuleSetHandleT  H)
inline

Remove the module represented by the given handle.

This will remove all modules in the layers below that were derived from the module represented by H.

Definition at line 144 of file CompileOnDemandLayer.h.


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