LLVM 23.0.0git
llvm::orc::EPCIndirectionUtils Class Reference

Provides ExecutorProcessControl based indirect stubs, trampoline pool and lazy call through manager. More...

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

Classes

class  ABISupport
 ABI support base class. More...

Public Member Functions

ExecutorProcessControlgetExecutorProcessControl () const
 Return a reference to the ExecutorProcessControl object.
MemoryAccessgetMemoryAccess () const
 Return a reference to the MemoryAccess object for this instance.
jitlink::JITLinkMemoryManagergetMemManager () const
 Return a reference to the JITLinkMemoryManager object for this instance.
ABISupportgetABISupport () const
 Return a reference to the ABISupport object for this instance.
LLVM_ABI Error cleanup ()
 Release memory for resources held by this instance.
LLVM_ABI Expected< ExecutorAddrwriteResolverBlock (ExecutorAddr ReentryFnAddr, ExecutorAddr ReentryCtxAddr)
 Write resolver code to the executor process and return its address.
ExecutorAddr getResolverBlockAddress () const
 Returns the address of the Resolver block.
LLVM_ABI std::unique_ptr< IndirectStubsManagercreateIndirectStubsManager ()
 Create an IndirectStubsManager for the executor process.
LLVM_ABI TrampolinePoolgetTrampolinePool ()
 Create a TrampolinePool for the executor process.
LLVM_ABI LazyCallThroughManagercreateLazyCallThroughManager (ExecutionSession &ES, ExecutorAddr ErrorHandlerAddr)
 Create a LazyCallThroughManager.
LazyCallThroughManagergetLazyCallThroughManager ()
 Create a LazyCallThroughManager for the executor process.

Static Public Member Functions

template<typename ORCABI>
static std::unique_ptr< EPCIndirectionUtilsCreateWithABI (ExecutorProcessControl &EPC, jitlink::JITLinkMemoryManager &MemMgr, MemoryAccess &MemAccess)
 Create using the given ABI class.
static LLVM_ABI Expected< std::unique_ptr< EPCIndirectionUtils > > Create (ExecutorProcessControl &EPC, jitlink::JITLinkMemoryManager &MemMgr, MemoryAccess &MemAccess)
 Create based on the ExecutorProcessControl triple.

Friends

class EPCIndirectionUtilsAccess

Detailed Description

Provides ExecutorProcessControl based indirect stubs, trampoline pool and lazy call through manager.

Definition at line 32 of file EPCIndirectionUtils.h.

Member Function Documentation

◆ cleanup()

Error llvm::orc::EPCIndirectionUtils::cleanup ( )

Release memory for resources held by this instance.

This must be called prior to destruction of the class.

Definition at line 276 of file EPCIndirectionUtils.cpp.

References llvm::joinErrors().

◆ Create()

◆ createIndirectStubsManager()

std::unique_ptr< IndirectStubsManager > llvm::orc::EPCIndirectionUtils::createIndirectStubsManager ( )

Create an IndirectStubsManager for the executor process.

Definition at line 321 of file EPCIndirectionUtils.cpp.

◆ createLazyCallThroughManager()

LazyCallThroughManager & llvm::orc::EPCIndirectionUtils::createLazyCallThroughManager ( ExecutionSession & ES,
ExecutorAddr ErrorHandlerAddr )

Create a LazyCallThroughManager.

This function should only be called once.

Definition at line 331 of file EPCIndirectionUtils.cpp.

References assert(), and getTrampolinePool().

◆ CreateWithABI()

template<typename ORCABI>
std::unique_ptr< EPCIndirectionUtils > llvm::orc::EPCIndirectionUtils::CreateWithABI ( ExecutorProcessControl & EPC,
jitlink::JITLinkMemoryManager & MemMgr,
MemoryAccess & MemAccess )
static

Create using the given ABI class.

Definition at line 223 of file EPCIndirectionUtils.h.

Referenced by Create().

◆ getABISupport()

ABISupport & llvm::orc::EPCIndirectionUtils::getABISupport ( ) const
inline

Return a reference to the ABISupport object for this instance.

Definition at line 101 of file EPCIndirectionUtils.h.

◆ getExecutorProcessControl()

ExecutorProcessControl & llvm::orc::EPCIndirectionUtils::getExecutorProcessControl ( ) const
inline

Return a reference to the ExecutorProcessControl object.

Definition at line 92 of file EPCIndirectionUtils.h.

◆ getLazyCallThroughManager()

LazyCallThroughManager & llvm::orc::EPCIndirectionUtils::getLazyCallThroughManager ( )
inline

Create a LazyCallThroughManager for the executor process.

Definition at line 130 of file EPCIndirectionUtils.h.

References assert().

Referenced by llvm::orc::setUpInProcessLCTMReentryViaEPCIU().

◆ getMemManager()

jitlink::JITLinkMemoryManager & llvm::orc::EPCIndirectionUtils::getMemManager ( ) const
inline

Return a reference to the JITLinkMemoryManager object for this instance.

Definition at line 98 of file EPCIndirectionUtils.h.

◆ getMemoryAccess()

MemoryAccess & llvm::orc::EPCIndirectionUtils::getMemoryAccess ( ) const
inline

Return a reference to the MemoryAccess object for this instance.

Definition at line 95 of file EPCIndirectionUtils.h.

◆ getResolverBlockAddress()

ExecutorAddr llvm::orc::EPCIndirectionUtils::getResolverBlockAddress ( ) const
inline

Returns the address of the Resolver block.

Returns zero if the writeResolverBlock method has not previously been called.

Definition at line 115 of file EPCIndirectionUtils.h.

◆ getTrampolinePool()

TrampolinePool & llvm::orc::EPCIndirectionUtils::getTrampolinePool ( )

Create a TrampolinePool for the executor process.

Definition at line 325 of file EPCIndirectionUtils.cpp.

Referenced by createLazyCallThroughManager().

◆ writeResolverBlock()

Expected< ExecutorAddr > llvm::orc::EPCIndirectionUtils::writeResolverBlock ( ExecutorAddr ReentryFnAddr,
ExecutorAddr ReentryCtxAddr )

Write resolver code to the executor process and return its address.

This must be called before any call to createTrampolinePool or createLazyCallThroughManager.

Definition at line 292 of file EPCIndirectionUtils.cpp.

References llvm::Alloc, and assert().

Referenced by llvm::orc::setUpInProcessLCTMReentryViaEPCIU().

◆ EPCIndirectionUtilsAccess

friend class EPCIndirectionUtilsAccess
friend

Definition at line 33 of file EPCIndirectionUtils.h.

References EPCIndirectionUtilsAccess.

Referenced by EPCIndirectionUtilsAccess.


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