13#ifndef LLVM_EXECUTIONENGINE_ORC_MEMORYMAPPER_H
14#define LLVM_EXECUTIONENGINE_ORC_MEMORYMAPPER_H
91 void reserve(
size_t NumBytes, OnReservedFunction OnReserved)
override;
98 OnDeinitializedFunction OnDeInitialized)
override;
101 OnReleasedFunction OnRelease)
override;
108 std::vector<shared::WrapperFunctionCall> DeinitializationActions;
114 std::vector<ExecutorAddr> Allocations;
116 using ReservationMap = DenseMap<void *, Reservation>;
119 ReservationMap Reservations;
120 AllocationMap Allocations;
143 void reserve(
size_t NumBytes, OnReservedFunction OnReserved)
override;
150 OnDeinitializedFunction OnDeInitialized)
override;
153 OnReleasedFunction OnRelease)
override;
164 ExecutorProcessControl &EPC;
169 std::map<ExecutorAddr, Reservation> Reservations;
static cl::opt< int > PageSize("imp-null-check-page-size", cl::desc("The page size of the target in bytes"), cl::init(4096), cl::Hidden)
Provides a library for accessing information about this process and other processes on the operating ...
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef< StringLiteral > StandardNames)
Initialize the set of available library functions based on the specified target triple.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
A pair of memory protections and allocation policies.
Represents an address in the executor process.
ExecutorProcessControl supports interaction with a JIT target process.
unsigned int getPageSize() override
Manages mapping, content transfer and protections for JIT memory.
virtual char * prepare(ExecutorAddr Addr, size_t ContentSize)=0
Provides working memory.
virtual unsigned int getPageSize()=0
virtual void release(ArrayRef< ExecutorAddr > Reservations, OnReleasedFunction OnRelease)=0
Release address space acquired through reserve()
virtual void initialize(AllocInfo &AI, OnInitializedFunction OnInitialized)=0
Ensures executor memory is synchronized with working copy memory, sends functions to be called after ...
virtual void deinitialize(ArrayRef< ExecutorAddr > Allocations, OnDeinitializedFunction OnDeInitialized)=0
Runs previously specified deinitialization actions Executor addresses returned by initialize should b...
virtual void reserve(size_t NumBytes, OnReservedFunction OnReserved)=0
Reserves address space in executor process.
unsigned int getPageSize() override
unique_function is a type-erasing functor similar to std::function.
std::vector< AllocActionCallPair > AllocActions
A vector of allocation actions to be run for this allocation.
This is an optimization pass for GlobalISel generic memory operations.
Summary of memprof metadata on allocations.
Represents a single allocation containing multiple segments and initialization and deinitialization a...
std::vector< SegInfo > Segments
shared::AllocActions Actions
ExecutorAddr Deinitialize