| LLVM 22.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 | 
| Public Member Functions | |
| LLVM_ABI | SimpleSegmentAlloc (SimpleSegmentAlloc &&) | 
| LLVM_ABI SimpleSegmentAlloc & | operator= (SimpleSegmentAlloc &&) | 
| LLVM_ABI | ~SimpleSegmentAlloc () | 
| LLVM_ABI SegmentInfo | getSegInfo (orc::AllocGroup AG) | 
| Returns the SegmentInfo for the given group. | |
| void | finalize (OnFinalizedFunction OnFinalized) | 
| Finalize all groups (async version). | |
| Expected< JITLinkMemoryManager::FinalizedAlloc > | finalize () | 
| Finalize all groups. | |
| Static Public Member Functions | |
| static LLVM_ABI void | Create (JITLinkMemoryManager &MemMgr, std::shared_ptr< orc::SymbolStringPool > SSP, Triple TT, const JITLinkDylib *JD, SegmentMap Segments, OnCreatedFunction OnCreated) | 
| static LLVM_ABI Expected< SimpleSegmentAlloc > | Create (JITLinkMemoryManager &MemMgr, std::shared_ptr< orc::SymbolStringPool > SSP, Triple TT, 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.
Note: Segments with MemLifetime::NoAlloc are not permitted, since they would not be useful, and their presence is likely to indicate a bug.
Definition at line 299 of file JITLinkMemoryManager.h.
| using llvm::jitlink::SimpleSegmentAlloc::OnCreatedFunction = unique_function<void(Expected<SimpleSegmentAlloc>)> | 
Definition at line 319 of file JITLinkMemoryManager.h.
Definition at line 321 of file JITLinkMemoryManager.h.
Definition at line 317 of file JITLinkMemoryManager.h.
| 
 | default | 
References LLVM_ABI, and SimpleSegmentAlloc().
Referenced by Create(), operator=(), and SimpleSegmentAlloc().
| 
 | default | 
References LLVM_ABI.
| 
 | static | 
Definition at line 206 of file JITLinkMemoryManager.cpp.
References Create().
| 
 | static | 
Definition at line 146 of file JITLinkMemoryManager.cpp.
References llvm::alignTo(), llvm::jitlink::JITLinkMemoryManager::allocate(), assert(), B(), Create(), llvm::jitlink::getGenericEdgeKindName(), llvm::orc::ExecutorAddr::getValue(), llvm::orc::NoAlloc, llvm::orc::AllocGroup::NumGroups, and SimpleSegmentAlloc().
Referenced by Create(), Create(), and llvm::orc::ELFDebugObject::finalizeWorkingMemory().
| 
 | inline | 
Finalize all groups.
Definition at line 347 of file JITLinkMemoryManager.h.
| 
 | inline | 
Finalize all groups (async version).
Definition at line 342 of file JITLinkMemoryManager.h.
| SimpleSegmentAlloc::SegmentInfo llvm::jitlink::SimpleSegmentAlloc::getSegInfo | ( | orc::AllocGroup | AG | ) | 
Returns the SegmentInfo for the given group.
Definition at line 224 of file JITLinkMemoryManager.cpp.
References B(), getSegInfo(), and I.
Referenced by getSegInfo().
| 
 | default | 
References LLVM_ABI, and SimpleSegmentAlloc().