14#ifndef LLVM_EXECUTIONENGINE_ORC_EPCGENERICRTDYLDMEMORYMANAGER_H
15#define LLVM_EXECUTIONENGINE_ORC_EPCGENERICRTDYLDMEMORYMANAGER_H
21#define DEBUG_TYPE "orc"
57 uint8_t *allocateCodeSection(uintptr_t
Size,
unsigned Alignment,
61 uint8_t *allocateDataSection(uintptr_t
Size,
unsigned Alignment,
63 bool IsReadOnly)
override;
65 void reserveAllocationSpace(uintptr_t
CodeSize,
Align CodeAlign,
66 uintptr_t RODataSize,
Align RODataAlign,
67 uintptr_t RWDataSize,
Align RWDataAlign)
override;
69 bool needsToReserveAllocationSpace()
override;
73 void deregisterEHFrames()
override;
78 bool finalizeMemory(std::string *ErrMsg =
nullptr)
override;
89 std::unique_ptr<uint8_t[]> Contents;
96 struct SectionAllocGroup {
97 SectionAllocGroup() =
default;
98 SectionAllocGroup(
const SectionAllocGroup &) =
delete;
99 SectionAllocGroup &operator=(
const SectionAllocGroup &) =
delete;
100 SectionAllocGroup(SectionAllocGroup &&) =
default;
101 SectionAllocGroup &operator=(SectionAllocGroup &&) =
default;
103 ExecutorAddrRange RemoteCode;
104 ExecutorAddrRange RemoteROData;
105 ExecutorAddrRange RemoteRWData;
106 std::vector<ExecutorAddrRange> UnfinalizedEHFrames;
107 std::vector<SectionAlloc> CodeAllocs, RODataAllocs, RWDataAllocs;
111 void mapAllocsToRemoteAddrs(RuntimeDyld &Dyld,
112 std::vector<SectionAlloc> &SecAllocs,
113 ExecutorAddr NextAddr);
115 ExecutorProcessControl &EPC;
119 std::vector<SectionAllocGroup> Unmapped;
120 std::vector<SectionAllocGroup> Unfinalized;
121 std::vector<ExecutorAddr> FinalizedAllocs;
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
This class is the base class for all object file types.
Remote-mapped RuntimeDyld-compatible memory manager.
EPCGenericRTDyldMemoryManager & operator=(EPCGenericRTDyldMemoryManager &&)=delete
EPCGenericRTDyldMemoryManager(const EPCGenericRTDyldMemoryManager &)=delete
EPCGenericRTDyldMemoryManager & operator=(const EPCGenericRTDyldMemoryManager &)=delete
EPCGenericRTDyldMemoryManager(EPCGenericRTDyldMemoryManager &&)=delete
Represents an address in the executor process.
ExecutorProcessControl supports interaction with a JIT target process.
This is an optimization pass for GlobalISel generic memory operations.
Implement std::hash so that hash_code can be used in STL containers.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Symbol addresses for memory access.
ExecutorAddr DeregisterEHFrame
ExecutorAddr RegisterEHFrame