LLVM  7.0.0
Public Types | Public Member Functions | List of all members
llvm::orc::ExecutionSession Class Reference

An ExecutionSession represents a running JIT program. More...

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

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

Public Types

using ErrorReporter = std::function< void(Error)>
 
using DispatchMaterializationFunction = std::function< void(VSO &V, std::unique_ptr< MaterializationUnit > MU)>
 
- Public Types inherited from llvm::orc::ExecutionSessionBase
using ErrorReporter = std::function< void(Error)>
 For reporting errors. More...
 
using DispatchMaterializationFunction = std::function< void(VSO &V, std::unique_ptr< MaterializationUnit > MU)>
 For dispatching MaterializationUnit::materialize calls. More...
 
using LegacyAsyncLookupFunction = std::function< SymbolNameSet(std::shared_ptr< AsynchronousSymbolQuery > Q, SymbolNameSet Names)>
 

Public Member Functions

 ExecutionSession (std::shared_ptr< SymbolStringPool > SSP=nullptr)
 Construct an ExecutionEngine. More...
 
VSO & createVSO (std::string Name)
 Add a new VSO to this ExecutionSession. More...
 
- Public Member Functions inherited from llvm::orc::ExecutionSessionBase
 ExecutionSessionBase (std::shared_ptr< SymbolStringPool > SSP=nullptr)
 Construct an ExecutionSessionBase. More...
 
SymbolStringPool & getSymbolStringPool () const
 Returns the SymbolStringPool for this ExecutionSession. More...
 
template<typename Func >
auto runSessionLocked (Func &&F) -> decltype(F())
 Run the given lambda with the session mutex locked. More...
 
ExecutionSessionBase & setErrorReporter (ErrorReporter ReportError)
 Set the error reporter function. More...
 
ExecutionSessionBase & setDispatchMaterialization (DispatchMaterializationFunction DispatchMaterialization)
 Set the materialization dispatch function. More...
 
void reportError (Error Err)
 Report a error for this execution session. More...
 
VModuleKey allocateVModule ()
 Allocate a module key for a new module to add to the JIT. More...
 
void releaseVModule (VModuleKey Key)
 Return a module key to the ExecutionSession so that it can be re-used. More...
 
void legacyFailQuery (AsynchronousSymbolQuery &Q, Error Err)
 
Expected< SymbolMap > legacyLookup (ExecutionSessionBase &ES, LegacyAsyncLookupFunction AsyncLookup, SymbolNameSet Names, bool WaiUntilReady, RegisterDependenciesFunction RegisterDependencies)
 A legacy lookup function for JITSymbolResolverAdapter. More...
 
void lookup (const VSOList &VSOs, const SymbolNameSet &Symbols, SymbolsResolvedCallback OnResolve, SymbolsReadyCallback OnReady, RegisterDependenciesFunction RegisterDependencies)
 Search the given VSO list for the given symbols. More...
 
Expected< SymbolMap > lookup (const VSOList &VSOs, const SymbolNameSet &Symbols, RegisterDependenciesFunction RegisterDependencies, bool WaitUntilReady=true)
 Blocking version of lookup above. More...
 
void dispatchMaterialization (VSO &V, std::unique_ptr< MaterializationUnit > MU)
 Materialize the given unit. More...
 

Detailed Description

An ExecutionSession represents a running JIT program.

Definition at line 735 of file Core.h.

Member Typedef Documentation

◆ DispatchMaterializationFunction

Definition at line 740 of file Core.h.

◆ ErrorReporter

Definition at line 737 of file Core.h.

Constructor & Destructor Documentation

◆ ExecutionSession()

llvm::orc::ExecutionSession::ExecutionSession ( std::shared_ptr< SymbolStringPool >  SSP = nullptr)
inline

Construct an ExecutionEngine.

SymbolStringPools may be shared between ExecutionSessions.

Definition at line 745 of file Core.h.

References llvm::orc::lookup().

Member Function Documentation

◆ createVSO()

VSO & llvm::orc::ExecutionSession::createVSO ( std::string  Name)

Add a new VSO to this ExecutionSession.

Definition at line 1648 of file Core.cpp.


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