LLVM 24.0.0git
SimpleNativeMemoryMapSPSCI.h
Go to the documentation of this file.
1//===-- SimpleNativeMemoryMapSPSCI.h - SPS CI for mem mgmt ------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// SPS controller-interface descriptors for the runtime's SimpleNativeMemoryMap
10// interface. Instances of the executor-side manager are created by calling
11// MemMgrCreate, and the instance address is passed as the first argument to
12// each of the other calls.
13//
14// The names below are the SimpleNativeMemoryMap defaults. Callers may resolve
15// these operations under other names, so a descriptor's Name is a default
16// rather than a fixed part of the contract.
17//
18// See CallSPSCI.h for a description of the descriptor scheme.
19//
20//===----------------------------------------------------------------------===//
21
22#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_SPSCI_SIMPLENATIVEMEMORYMAPSPSCI_H
23#define LLVM_EXECUTIONENGINE_ORC_SHARED_SPSCI_SIMPLENATIVEMEMORYMAPSPSCI_H
24
29
30#include <cstdint>
31
32namespace llvm::orc::rt::sps_ci {
33
34/// Create a new executor-side memory-manager instance; returns its address.
35/// The instance is owned by the executor, and lives until the executor shuts
36/// down.
38 static constexpr SymbolNameSpec Name =
39 SymbolNameSpec::c("orc_rt_ci_sps_SimpleNativeMemoryMap_create");
41};
42
43/// A pre-created executor-side memory-manager instance. This is a data symbol
44/// (the allocator object), not a wrapper to call.
45///
46/// This is published by executors that do not provide MemMgrCreate --
47/// currently only LLVM's OrcTargetProcess library, whose wrapper functions
48/// have no context through which a new instance could be registered. Executors
49/// built on the ORC runtime provide MemMgrCreate instead.
50///
51/// FIXME: Remove this once OrcTargetProcess is retired.
53 SymbolNameSpec::c("orc_rt_ci_SimpleNativeMemoryMap_Instance");
54
55/// Reserve an address range of the given size; returns its base.
57 static constexpr SymbolNameSpec Name =
58 SymbolNameSpec::c("orc_rt_ci_sps_SimpleNativeMemoryMap_reserve");
61};
62
63/// Apply a finalize request; returns a key for the initialized allocation.
65 static constexpr SymbolNameSpec Name =
66 SymbolNameSpec::c("orc_rt_ci_sps_SimpleNativeMemoryMap_initialize");
69};
70
71/// Deinitialize the allocations with the given base addresses (running their
72/// deallocation actions) without releasing their memory.
75 "orc_rt_ci_sps_SimpleNativeMemoryMap_deinitializeMultiple");
76 using SPSSig = shared::SPSError(shared::SPSExecutorAddr,
78};
79
80/// Release the allocations with the given base addresses.
82 static constexpr SymbolNameSpec Name =
83 SymbolNameSpec::c("orc_rt_ci_sps_SimpleNativeMemoryMap_releaseMultiple");
84 using SPSSig = shared::SPSError(shared::SPSExecutorAddr,
86};
87
88} // namespace llvm::orc::rt::sps_ci
89
90#endif // LLVM_EXECUTIONENGINE_ORC_SHARED_SPSCI_SIMPLENATIVEMEMORYMAPSPSCI_H
uint64_t uint64_t
A symbol name together with the naming level (SymbolNameKind) it is expressed in, so that a Mangler /...
static constexpr SymbolNameSpec c(StringRef Name)
SPS tag type for expecteds, which are either a T or a string representing an error.
constexpr SymbolNameSpec SimpleNativeMemoryMapInstanceName
A pre-created executor-side memory-manager instance.
SPSTuple< SPSSequence< SPSSegFinalizeRequest >, SPSSequence< SPSAllocActionCallPair > > SPSFinalizeRequest
Create a new executor-side memory-manager instance; returns its address.
shared::SPSExpected< shared::SPSExecutorAddr >() SPSSig
Deinitialize the allocations with the given base addresses (running their deallocation actions) witho...
shared::SPSError(shared::SPSExecutorAddr, shared::SPSSequence< shared::SPSExecutorAddr >) SPSSig
Apply a finalize request; returns a key for the initialized allocation.
shared::SPSExpected< shared::SPSExecutorAddr >( shared::SPSExecutorAddr, shared::SPSFinalizeRequest) SPSSig
Release the allocations with the given base addresses.
shared::SPSError(shared::SPSExecutorAddr, shared::SPSSequence< shared::SPSExecutorAddr >) SPSSig
Reserve an address range of the given size; returns its base.
shared::SPSExpected< shared::SPSExecutorAddr >( shared::SPSExecutorAddr, uint64_t) SPSSig