|
LLVM 24.0.0git
|
#include "llvm/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.h"
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 Types | |
| using | ReserveProxy = Proxy<Expected<ExecutorAddr>(ExecutorAddr, uint64_t)> |
| Reserve an address range of the given size; returns its base. | |
| using | InitializeProxy |
| Apply a finalize request; returns a key for the initialized allocation. | |
| using | DeinitializeProxy = Proxy<Error(ExecutorAddr, ArrayRef<ExecutorAddr>)> |
| Deinitialize the allocations with the given base addresses (running their deallocation actions) without releasing their memory. | |
| using | ReleaseProxy = Proxy<Error(ExecutorAddr, ArrayRef<ExecutorAddr>)> |
| Release the allocations with the given base addresses. | |
| Public Types inherited from llvm::jitlink::JITLinkMemoryManager | |
| using | AllocResult = Expected<std::unique_ptr<InFlightAlloc>> |
| Typedef for the argument to be passed to OnAllocatedFunction. | |
| using | OnAllocatedFunction = unique_function<void(AllocResult)> |
| Called when allocation has been completed. | |
| using | OnDeallocatedFunction = unique_function<void(Error)> |
| Called when deallocation has completed. | |
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. | |
| Public Member Functions inherited from llvm::jitlink::JITLinkMemoryManager | |
| virtual | ~JITLinkMemoryManager () |
| AllocResult | allocate (const JITLinkDylib *JD, LinkGraph &G) |
| Convenience function for blocking allocation. | |
| void | deallocate (FinalizedAlloc Alloc, OnDeallocatedFunction OnDeallocated) |
| Convenience function for deallocation of a single alloc. | |
| Error | deallocate (std::vector< FinalizedAlloc > Allocs) |
| Convenience function for blocking deallocation. | |
| Error | deallocate (FinalizedAlloc Alloc) |
| Convenience function for blocking deallocation of a single alloc. | |
| virtual void | notifyDestroying (JITLinkDylib &JD) |
| Called when a JITLinkDylib that this manager previously registered with (via JITLinkDylib::notifyOnDestruction) is being destroyed. | |
Definition at line 35 of file EPCGenericJITLinkMemoryManager.h.
| using llvm::orc::EPCGenericJITLinkMemoryManager::DeinitializeProxy = Proxy<Error(ExecutorAddr, ArrayRef<ExecutorAddr>)> |
Deinitialize the allocations with the given base addresses (running their deallocation actions) without releasing their memory.
Definition at line 47 of file EPCGenericJITLinkMemoryManager.h.
Apply a finalize request; returns a key for the initialized allocation.
Definition at line 42 of file EPCGenericJITLinkMemoryManager.h.
| using llvm::orc::EPCGenericJITLinkMemoryManager::ReleaseProxy = Proxy<Error(ExecutorAddr, ArrayRef<ExecutorAddr>)> |
Release the allocations with the given base addresses.
Definition at line 50 of file EPCGenericJITLinkMemoryManager.h.
| using llvm::orc::EPCGenericJITLinkMemoryManager::ReserveProxy = Proxy<Expected<ExecutorAddr>(ExecutorAddr, uint64_t)> |
Reserve an address range of the given size; returns its base.
Definition at line 39 of file EPCGenericJITLinkMemoryManager.h.
|
inline |
Create an EPCGenericJITLinkMemoryManager instance from a given set of memory-manager bindings.
Definition at line 72 of file EPCGenericJITLinkMemoryManager.h.
References llvm::move().
Referenced by llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::InFlightAlloc().
|
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 82 of file EPCGenericJITLinkMemoryManager.cpp.
References G, llvm::jitlink::BasicLayout::getContiguousPageBasedLayoutSizes(), and llvm::Expected< T >::takeError().
|
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 102 of file EPCGenericJITLinkMemoryManager.cpp.
References A().