|
LLVM 23.0.0git
|
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 | |
| ExecutorProcessControl & | getExecutorProcessControl () const |
| Return a reference to the ExecutorProcessControl object. | |
| MemoryAccess & | getMemoryAccess () const |
| Return a reference to the MemoryAccess object for this instance. | |
| jitlink::JITLinkMemoryManager & | getMemManager () const |
| Return a reference to the JITLinkMemoryManager object for this instance. | |
| ABISupport & | getABISupport () 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< ExecutorAddr > | writeResolverBlock (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< IndirectStubsManager > | createIndirectStubsManager () |
| Create an IndirectStubsManager for the executor process. | |
| LLVM_ABI TrampolinePool & | getTrampolinePool () |
| Create a TrampolinePool for the executor process. | |
| LLVM_ABI LazyCallThroughManager & | createLazyCallThroughManager (ExecutionSession &ES, ExecutorAddr ErrorHandlerAddr) |
| Create a LazyCallThroughManager. | |
| LazyCallThroughManager & | getLazyCallThroughManager () |
| Create a LazyCallThroughManager for the executor process. | |
Static Public Member Functions | |
| template<typename ORCABI> | |
| static std::unique_ptr< EPCIndirectionUtils > | CreateWithABI (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 |
Provides ExecutorProcessControl based indirect stubs, trampoline pool and lazy call through manager.
Definition at line 32 of file EPCIndirectionUtils.h.
| 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().
|
static |
Create based on the ExecutorProcessControl triple.
Definition at line 236 of file EPCIndirectionUtils.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, CreateWithABI(), llvm::inconvertibleErrorCode(), llvm::Triple::loongarch64, llvm::make_error(), llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::riscv64, llvm::Triple::Win32, llvm::Triple::x86, and llvm::Triple::x86_64.
| std::unique_ptr< IndirectStubsManager > llvm::orc::EPCIndirectionUtils::createIndirectStubsManager | ( | ) |
Create an IndirectStubsManager for the executor process.
Definition at line 321 of file EPCIndirectionUtils.cpp.
| 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().
|
static |
Create using the given ABI class.
Definition at line 223 of file EPCIndirectionUtils.h.
Referenced by Create().
|
inline |
Return a reference to the ABISupport object for this instance.
Definition at line 101 of file EPCIndirectionUtils.h.
|
inline |
Return a reference to the ExecutorProcessControl object.
Definition at line 92 of file EPCIndirectionUtils.h.
|
inline |
Create a LazyCallThroughManager for the executor process.
Definition at line 130 of file EPCIndirectionUtils.h.
References assert().
Referenced by llvm::orc::setUpInProcessLCTMReentryViaEPCIU().
|
inline |
Return a reference to the JITLinkMemoryManager object for this instance.
Definition at line 98 of file EPCIndirectionUtils.h.
|
inline |
Return a reference to the MemoryAccess object for this instance.
Definition at line 95 of file EPCIndirectionUtils.h.
|
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.
| TrampolinePool & llvm::orc::EPCIndirectionUtils::getTrampolinePool | ( | ) |
Create a TrampolinePool for the executor process.
Definition at line 325 of file EPCIndirectionUtils.cpp.
Referenced by createLazyCallThroughManager().
| 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().
|
friend |
Definition at line 33 of file EPCIndirectionUtils.h.
References EPCIndirectionUtilsAccess.
Referenced by EPCIndirectionUtilsAccess.