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

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

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

Classes

struct  Bindings
 The resolved controller-side handle to an executor-side memory manager: the address of the allocator instance (passed as the first argument to each call) plus the proxies for its functions. More...
class  InFlightAlloc

Public Member Functions

 EPCGenericJITLinkMemoryManager (ExecutionSession &ES, Bindings B)
 Create an EPCGenericJITLinkMemoryManager instance from a given set of memory-manager bindings.
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)
 Create an EPCGenericJITLinkMemoryManager for the ORC runtime's SimpleNativeMemoryMap interface, resolving its symbols in the given JITDylib.
static Expected< std::unique_ptr< EPCGenericJITLinkMemoryManager > > Create (ExecutionSession &ES)
 Create an EPCGenericJITLinkMemoryManager for the ORC runtime's SimpleNativeMemoryMap interface, resolving its symbols in the given ExecutionSession's bootstrap JITDylib.

Additional Inherited Members

Detailed Description

Definition at line 29 of file EPCGenericJITLinkMemoryManager.h.

Constructor & Destructor Documentation

◆ EPCGenericJITLinkMemoryManager()

llvm::orc::EPCGenericJITLinkMemoryManager::EPCGenericJITLinkMemoryManager ( ExecutionSession & ES,
Bindings B )
inline

Create an EPCGenericJITLinkMemoryManager instance from a given set of memory-manager bindings.

Definition at line 51 of file EPCGenericJITLinkMemoryManager.h.

References llvm::move().

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 113 of file EPCGenericJITLinkMemoryManager.cpp.

References G, llvm::jitlink::BasicLayout::getContiguousPageBasedLayoutSizes(), and llvm::Expected< T >::takeError().

◆ Create() [1/2]

Expected< std::unique_ptr< EPCGenericJITLinkMemoryManager > > llvm::orc::EPCGenericJITLinkMemoryManager::Create ( ExecutionSession & ES)
static

Create an EPCGenericJITLinkMemoryManager for the ORC runtime's SimpleNativeMemoryMap interface, resolving its symbols in the given ExecutionSession's bootstrap JITDylib.

Definition at line 109 of file EPCGenericJITLinkMemoryManager.cpp.

References Create().

◆ 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 133 of file EPCGenericJITLinkMemoryManager.cpp.

References A().


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