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

Methods

BasicLayout(llvm::jitlink::LinkGraph& G)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:252

Parameters

llvm::jitlink::LinkGraph& G

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)

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()

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()

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()

Description

Returns an iterator over the segments of the layout.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:270