LLVM
17.0.0git
|
A utility class for making simple allocations using JITLinkMemoryManager. More...
#include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"
Classes | |
struct | Segment |
Describes a segment to be allocated. More... | |
struct | SegmentInfo |
Describes the segment working memory and executor address. More... | |
Public Types | |
using | SegmentMap = orc::AllocGroupSmallMap< Segment > |
using | OnCreatedFunction = unique_function< void(Expected< SimpleSegmentAlloc >)> |
using | OnFinalizedFunction = JITLinkMemoryManager::InFlightAlloc::OnFinalizedFunction |
Public Member Functions | |
SimpleSegmentAlloc (SimpleSegmentAlloc &&) | |
SimpleSegmentAlloc & | operator= (SimpleSegmentAlloc &&) |
~SimpleSegmentAlloc () | |
SegmentInfo | getSegInfo (orc::AllocGroup AG) |
Returns the SegmentInfo for the given group. More... | |
void | finalize (OnFinalizedFunction OnFinalized) |
Finalize all groups (async version). More... | |
Expected< JITLinkMemoryManager::FinalizedAlloc > | finalize () |
Finalize all groups. More... | |
Static Public Member Functions | |
static void | Create (JITLinkMemoryManager &MemMgr, const JITLinkDylib *JD, SegmentMap Segments, OnCreatedFunction OnCreated) |
static Expected< SimpleSegmentAlloc > | Create (JITLinkMemoryManager &MemMgr, const JITLinkDylib *JD, SegmentMap Segments) |
A utility class for making simple allocations using JITLinkMemoryManager.
SimpleSegementAlloc takes a mapping of AllocGroups to Segments and uses this to create a LinkGraph with one Section (containing one Block) per Segment. Clients can obtain a pointer to the working memory and executor address of that block using the Segment's AllocGroup. Once memory has been populated, clients can call finalize to finalize the memory.
Definition at line 294 of file JITLinkMemoryManager.h.
using llvm::jitlink::SimpleSegmentAlloc::OnCreatedFunction = unique_function<void(Expected<SimpleSegmentAlloc>)> |
Definition at line 314 of file JITLinkMemoryManager.h.
using llvm::jitlink::SimpleSegmentAlloc::OnFinalizedFunction = JITLinkMemoryManager::InFlightAlloc::OnFinalizedFunction |
Definition at line 317 of file JITLinkMemoryManager.h.
Definition at line 312 of file JITLinkMemoryManager.h.
|
default |
Referenced by Create().
|
default |
|
static |
Definition at line 200 of file JITLinkMemoryManager.cpp.
|
static |
Definition at line 145 of file JITLinkMemoryManager.cpp.
References llvm::alignTo(), llvm::jitlink::JITLinkMemoryManager::allocate(), B, llvm::orc::ExecutorAddr::getValue(), move, llvm::support::native, llvm::orc::AllocGroup::NumGroups, and SimpleSegmentAlloc().
Referenced by Create(), and llvm::orc::ELFDebugObject::finalizeWorkingMemory().
|
inline |
Finalize all groups.
Definition at line 339 of file JITLinkMemoryManager.h.
|
inline |
Finalize all groups (async version).
Definition at line 334 of file JITLinkMemoryManager.h.
References move.
SimpleSegmentAlloc::SegmentInfo llvm::jitlink::SimpleSegmentAlloc::getSegInfo | ( | orc::AllocGroup | AG | ) |
Returns the SegmentInfo for the given group.
Definition at line 217 of file JITLinkMemoryManager.cpp.
|
default |