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

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

Inheritance diagram for llvm::orc::EPCGenericJITLinkMemoryManager:
[legend]

Classes

class  InFlightAlloc
struct  SymbolAddrs
 Symbol addresses for memory management implementation. More...

Public Member Functions

 EPCGenericJITLinkMemoryManager (ExecutorProcessControl &EPC, SymbolAddrs SAs)
 Create an EPCGenericJITLinkMemoryManager instance from a given set of function addrs.
void allocate (const jitlink::JITLinkDylib *JD, jitlink::LinkGraph &G, OnAllocatedFunction OnAllocated) override
 Start the allocation process.
void deallocate (std::vector< FinalizedAlloc > Allocs, OnDeallocatedFunction OnDeallocated) override
 Deallocate a list of allocation objects.

Static Public Member Functions

static Expected< std::unique_ptr< EPCGenericJITLinkMemoryManager > > Create (JITDylib &JD, rt::SimpleExecutorMemoryManagerSymbolNames SNs=rt::orc_rt_SimpleNativeMemoryMapSPSSymbols)
 Create an EPCGenericJITLinkMemoryManager using the given implementation symbol names.
static Expected< std::unique_ptr< EPCGenericJITLinkMemoryManager > > Create (ExecutionSession &ES, rt::SimpleExecutorMemoryManagerSymbolNames SNs=rt::orc_rt_SimpleNativeMemoryMapSPSSymbols)
 Create an EPCGenericJITLinkMemoryManager using the given implementation symbol names.

Additional Inherited Members

Detailed Description

Definition at line 29 of file EPCGenericJITLinkMemoryManager.h.

Constructor & Destructor Documentation

◆ EPCGenericJITLinkMemoryManager()

llvm::orc::EPCGenericJITLinkMemoryManager::EPCGenericJITLinkMemoryManager ( ExecutorProcessControl & EPC,
SymbolAddrs SAs )
inline

Create an EPCGenericJITLinkMemoryManager instance from a given set of function addrs.

Definition at line 43 of file EPCGenericJITLinkMemoryManager.h.

Referenced by llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::InFlightAlloc().

Member Function Documentation

◆ allocate()

void llvm::orc::EPCGenericJITLinkMemoryManager::allocate ( const jitlink::JITLinkDylib * JD,
jitlink::LinkGraph & G,
OnAllocatedFunction OnAllocated )
overridevirtual

Start the allocation process.

If the initial allocation is successful then the OnAllocated function will be called with a std::unique_ptr<InFlightAlloc> value. If the assocation is unsuccessful then the OnAllocated function will be called with an Error.

Implements llvm::jitlink::JITLinkMemoryManager.

Definition at line 126 of file EPCGenericJITLinkMemoryManager.cpp.

References llvm::cantFail(), G, and llvm::jitlink::BasicLayout::getContiguousPageBasedLayoutSizes().

◆ Create() [1/2]

Expected< std::unique_ptr< EPCGenericJITLinkMemoryManager > > llvm::orc::EPCGenericJITLinkMemoryManager::Create ( ExecutionSession & ES,
rt::SimpleExecutorMemoryManagerSymbolNames SNs = rt::orc_rt_SimpleNativeMemoryMapSPSSymbols )
static

Create an EPCGenericJITLinkMemoryManager using the given implementation symbol names.

These will be looked up in the given ExecutionSession's Bootstrap JITDylib.

Definition at line 121 of file EPCGenericJITLinkMemoryManager.cpp.

References Create(), and llvm::orc::ExecutionSession::getBootstrapJITDylib().

◆ Create() [2/2]

◆ deallocate()

void llvm::orc::EPCGenericJITLinkMemoryManager::deallocate ( std::vector< FinalizedAlloc > Allocs,
OnDeallocatedFunction OnDeallocated )
overridevirtual

Deallocate a list of allocation objects.

Dealloc actions will be run in reverse order (from the end of the vector to the start).

Implements llvm::jitlink::JITLinkMemoryManager.

Definition at line 151 of file EPCGenericJITLinkMemoryManager.cpp.

References A(), and llvm::cantFail().


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