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. The instance address of the executor-side manager is passed as
11// the first argument to each call.
12//
13// The names below are the SimpleNativeMemoryMap defaults. Callers may resolve
14// these operations under other names, so a descriptor's Name is a default
15// rather than a fixed part of the contract.
16//
17// See CallSPSCI.h for a description of the descriptor scheme.
18//
19//===----------------------------------------------------------------------===//
20
21#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_SPSCI_SIMPLENATIVEMEMORYMAPSPSCI_H
22#define LLVM_EXECUTIONENGINE_ORC_SHARED_SPSCI_SIMPLENATIVEMEMORYMAPSPSCI_H
23
27
28#include <cstdint>
29
30namespace llvm::orc::rt::sps_ci {
31
32/// The executor-side memory-manager instance. This is a data symbol (the
33/// allocator object) -- passed as the first argument to each call below -- not
34/// a wrapper to call.
35inline constexpr char SimpleNativeMemoryMapInstanceName[] =
36 "orc_rt_ci_SimpleNativeMemoryMap_Instance";
37
38/// Reserve an address range of the given size; returns its base.
40 static constexpr char Name[] = "orc_rt_ci_sps_SimpleNativeMemoryMap_reserve";
43};
44
45/// Apply a finalize request; returns a key for the initialized allocation.
47 static constexpr char Name[] =
48 "orc_rt_ci_sps_SimpleNativeMemoryMap_initialize";
51};
52
53/// Deinitialize the allocations with the given base addresses (running their
54/// deallocation actions) without releasing their memory.
56 static constexpr char Name[] =
57 "orc_rt_ci_sps_SimpleNativeMemoryMap_deinitializeMultiple";
58 using SPSSig = shared::SPSError(shared::SPSExecutorAddr,
60};
61
62/// Release the allocations with the given base addresses.
64 static constexpr char Name[] =
65 "orc_rt_ci_sps_SimpleNativeMemoryMap_releaseMultiple";
66 using SPSSig = shared::SPSError(shared::SPSExecutorAddr,
68};
69
70} // namespace llvm::orc::rt::sps_ci
71
72#endif // LLVM_EXECUTIONENGINE_ORC_SHARED_SPSCI_SIMPLENATIVEMEMORYMAPSPSCI_H
SPS tag type for expecteds, which are either a T or a string representing an error.
constexpr char SimpleNativeMemoryMapInstanceName[]
The executor-side memory-manager instance.
SPSTuple< SPSSequence< SPSSegFinalizeRequest >, SPSSequence< SPSAllocActionCallPair > > SPSFinalizeRequest
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