|
LLVM
7.0.0
|
Compile-on-demand layer. More...
#include "llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h"
Public Types | |
| using | PartitioningFtor = std::function< std::set< Function * >(Function &)> |
| Module partitioning functor. More... | |
| using | IndirectStubsManagerBuilderT = std::function< std::unique_ptr< IndirectStubsMgrT >()> |
| Builder for IndirectStubsManagers. More... | |
| using | SymbolResolverGetter = std::function< std::shared_ptr< SymbolResolver >(VModuleKey K)> |
| using | SymbolResolverSetter = std::function< void(VModuleKey K, std::shared_ptr< SymbolResolver > R)> |
Public Member Functions | |
| CompileOnDemandLayer (ExecutionSession &ES, BaseLayerT &BaseLayer, SymbolResolverGetter GetSymbolResolver, SymbolResolverSetter SetSymbolResolver, PartitioningFtor Partition, CompileCallbackMgrT &CallbackMgr, IndirectStubsManagerBuilderT CreateIndirectStubsManager, bool CloneStubsIntoPartitions=true) | |
| Construct a compile-on-demand layer instance. More... | |
| ~CompileOnDemandLayer () | |
| Error | addModule (VModuleKey K, std::unique_ptr< Module > M) |
| Add a module to the compile-on-demand layer. More... | |
| Error | addExtraModule (VModuleKey K, std::unique_ptr< Module > M) |
| Add extra modules to an existing logical module. More... | |
| Error | removeModule (VModuleKey K) |
| Remove the module represented by the given key. More... | |
| JITSymbol | findSymbol (StringRef Name, bool ExportedSymbolsOnly) |
| Search for the given named symbol. More... | |
| JITSymbol | findSymbolIn (VModuleKey K, const std::string &Name, bool ExportedSymbolsOnly) |
| Get the address of a symbol provided by this layer, or some layer below this one. More... | |
| Error | updatePointer (std::string FuncName, JITTargetAddress FnBodyAddr) |
| Update the stub for the given function to point at FnBodyAddr. More... | |
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 111 of file CompileOnDemandLayer.h.
| using llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, IndirectStubsMgrT >::IndirectStubsManagerBuilderT = std::function<std::unique_ptr<IndirectStubsMgrT>()> |
Builder for IndirectStubsManagers.
Definition at line 245 of file CompileOnDemandLayer.h.
| using llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, IndirectStubsMgrT >::PartitioningFtor = std::function<std::set<Function*>(Function&)> |
Module partitioning functor.
Definition at line 241 of file CompileOnDemandLayer.h.
| using llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, IndirectStubsMgrT >::SymbolResolverGetter = std::function<std::shared_ptr<SymbolResolver>(VModuleKey K)> |
Definition at line 248 of file CompileOnDemandLayer.h.
| using llvm::orc::CompileOnDemandLayer< BaseLayerT, CompileCallbackMgrT, IndirectStubsMgrT >::SymbolResolverSetter = std::function<void(VModuleKey K, std::shared_ptr<SymbolResolver> R)> |
Definition at line 251 of file CompileOnDemandLayer.h.
|
inline |
Construct a compile-on-demand layer instance.
Definition at line 254 of file CompileOnDemandLayer.h.
|
inline |
Definition at line 268 of file CompileOnDemandLayer.h.
|
inline |
Add extra modules to an existing logical module.
Definition at line 287 of file CompileOnDemandLayer.h.
|
inline |
Add a module to the compile-on-demand layer.
Definition at line 275 of file CompileOnDemandLayer.h.
|
inline |
Search for the given named symbol.
| Name | The name of the symbol to search for. |
| ExportedSymbolsOnly | If true, search only for exported symbols. |
Definition at line 307 of file CompileOnDemandLayer.h.
|
inline |
Get the address of a symbol provided by this layer, or some layer below this one.
Definition at line 321 of file CompileOnDemandLayer.h.
|
inline |
Remove the module represented by the given key.
This will remove all modules in the layers below that were derived from the module represented by K.
Definition at line 295 of file CompileOnDemandLayer.h.
|
inline |
Update the stub for the given function to point at FnBodyAddr.
This can be used to support re-optimization.
Definition at line 335 of file CompileOnDemandLayer.h.
1.8.13