class BasicLayout
Declaration
class BasicLayout { /* full declaration omitted */ };Description
BasicLayout simplifies the implementation of JITLinkMemoryManagers. BasicLayout groups Sections into Segments based on their memory protection and deallocation policies. JITLinkMemoryManagers can construct a BasicLayout from a Graph, and then assign working memory and addresses to each of the Segments. These addreses will be mapped back onto the Graph blocks in the apply method.
Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:210
Member Variables
- private llvm::jitlink::LinkGraph& G
- private llvm::jitlink::BasicLayout::SegmentMap Segments
Method Overview
- public BasicLayout(llvm::jitlink::LinkGraph & G)
- public llvm::Error apply()
- public Expected<llvm::jitlink::BasicLayout::ContiguousPageBasedLayoutSizes> getContiguousPageBasedLayoutSizes(uint64_t PageSize)
- public llvm::jitlink::LinkGraph & getGraph()
- public orc::shared::AllocActions & graphAllocActions()
- public iterator_range<SegmentMap::iterator> segments()
Methods
¶BasicLayout(llvm::jitlink::LinkGraph& G)
BasicLayout(llvm::jitlink::LinkGraph& G)Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:252
Parameters
¶llvm::Error apply()
llvm::Error apply()Description
Apply the layout to the graph.
Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:275
¶Expected<llvm::jitlink::BasicLayout::
ContiguousPageBasedLayoutSizes>
getContiguousPageBasedLayoutSizes(
uint64_t PageSize)
Expected<llvm::jitlink::BasicLayout::
ContiguousPageBasedLayoutSizes>
getContiguousPageBasedLayoutSizes(
uint64_t PageSize)Description
Returns the total number of required to allocate all segments (with each segment padded out to page size) for all standard segments, and all finalize segments. This is a convenience function for the common case where the segments will be allocated contiguously. This function will return an error if any segment has an alignment that is higher than a page.
Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:267
Parameters
- uint64_t PageSize
¶llvm::jitlink::LinkGraph& getGraph()
llvm::jitlink::LinkGraph& getGraph()Description
Return a reference to the graph this allocation was created from.
Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:255
¶orc::shared::AllocActions& graphAllocActions()
orc::shared::AllocActions& graphAllocActions()Description
Returns a reference to the AllocActions in the graph. This convenience function saves callers from having to #include LinkGraph.h if all they need are allocation actions.
Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:280
¶iterator_range<SegmentMap::iterator> segments()
iterator_range<SegmentMap::iterator> segments()Description
Returns an iterator over the segments of the layout.
Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:270