LLVM
24.0.0git
include
llvm
ExecutionEngine
Orc
Shared
SPSCI
CallSPSCI.h
Go to the documentation of this file.
1
//===----- CallSPSCI.h - SPS CI for running functions -----------*- 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 running functions in the executor.
10
//
11
// Each descriptor names one operation in the runtime's SPS controller
12
// interface and gives its wire signature. This is the contract between the
13
// party that implements the operation (the ORC runtime, or LLVM's
14
// OrcTargetProcess) and the party that calls it (the ORC controller), so it
15
// must not depend on either side's implementation.
16
//
17
//===----------------------------------------------------------------------===//
18
19
#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_SPSCI_CALLSPSCI_H
20
#define LLVM_EXECUTIONENGINE_ORC_SHARED_SPSCI_CALLSPSCI_H
21
22
#include "
llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h
"
23
#include "
llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h
"
24
#include "
llvm/ExecutionEngine/Orc/Shared/SymbolNameSpec.h
"
25
26
#include <cstdint>
27
28
namespace
llvm::orc::rt::sps_ci
{
29
30
/// Runs a main-like function (int(int argc, char *argv[])) in the executor.
31
/// Takes the function's address and an argument vector.
32
struct
CallMain
{
33
static
constexpr
SymbolNameSpec
Name
=
34
SymbolNameSpec::verbatim
(
"orc_rt_ci_sps_call_main"
);
35
using
SPSSig
= int64_t(
shared::SPSExecutorAddr
,
36
shared::SPSSequence<shared::SPSString>
);
37
};
38
39
/// Runs a void() function in the executor, given its address.
40
/// WARNING: This operation is experimental and may be removed.
41
struct
CallVoidVoid
{
42
static
constexpr
SymbolNameSpec
Name
=
43
SymbolNameSpec::verbatim
(
"orc_rt_ci_sps_call_void_void"
);
44
using
SPSSig
= void(
shared::SPSExecutorAddr
);
45
};
46
47
/// Runs an int32_t() function in the executor, given its address.
48
/// WARNING: This operation is experimental and may be removed.
49
struct
CallInt32Void
{
50
static
constexpr
SymbolNameSpec
Name
=
51
SymbolNameSpec::verbatim
(
"orc_rt_ci_sps_call_int32_void"
);
52
using
SPSSig
= int32_t(
shared::SPSExecutorAddr
);
53
};
54
55
/// Runs an int32_t(int32_t) function in the executor, given its address.
56
/// WARNING: This operation is experimental and may be removed.
57
struct
CallInt32Int32
{
58
static
constexpr
SymbolNameSpec
Name
=
59
SymbolNameSpec::verbatim
(
"orc_rt_ci_sps_call_int32_int32"
);
60
using
SPSSig
= int32_t(
shared::SPSExecutorAddr
, int32_t);
61
};
62
63
}
// namespace llvm::orc::rt::sps_ci
64
65
#endif
// LLVM_EXECUTIONENGINE_ORC_SHARED_SPSCI_CALLSPSCI_H
ExecutorAddress.h
SimplePackedSerialization.h
SymbolNameSpec.h
llvm::orc::SymbolNameSpec
A symbol name together with the naming level (SymbolNameKind) it is expressed in, so that a Mangler /...
Definition
SymbolNameSpec.h:39
llvm::orc::SymbolNameSpec::verbatim
static constexpr SymbolNameSpec verbatim(StringRef Name)
Definition
SymbolNameSpec.h:44
llvm::orc::shared::SPSExecutorAddr
Definition
ExecutorAddress.h:296
llvm::orc::shared::SPSSequence
SPS tag type for sequences.
Definition
SimplePackedSerialization.h:214
llvm::orc::rt::sps_ci
Definition
CallSPSCI.h:28
llvm::orc::rt::sps_ci::CallInt32Int32
Runs an int32_t(int32_t) function in the executor, given its address.
Definition
CallSPSCI.h:57
llvm::orc::rt::sps_ci::CallInt32Int32::Name
static constexpr SymbolNameSpec Name
Definition
CallSPSCI.h:58
llvm::orc::rt::sps_ci::CallInt32Int32::SPSSig
int32_t(shared::SPSExecutorAddr, int32_t) SPSSig
Definition
CallSPSCI.h:60
llvm::orc::rt::sps_ci::CallInt32Void
Runs an int32_t() function in the executor, given its address.
Definition
CallSPSCI.h:49
llvm::orc::rt::sps_ci::CallInt32Void::SPSSig
int32_t(shared::SPSExecutorAddr) SPSSig
Definition
CallSPSCI.h:52
llvm::orc::rt::sps_ci::CallInt32Void::Name
static constexpr SymbolNameSpec Name
Definition
CallSPSCI.h:50
llvm::orc::rt::sps_ci::CallMain
Runs a main-like function (int(int argc, char *argv[])) in the executor.
Definition
CallSPSCI.h:32
llvm::orc::rt::sps_ci::CallMain::SPSSig
int64_t(shared::SPSExecutorAddr, shared::SPSSequence< shared::SPSString >) SPSSig
Definition
CallSPSCI.h:35
llvm::orc::rt::sps_ci::CallMain::Name
static constexpr SymbolNameSpec Name
Definition
CallSPSCI.h:33
llvm::orc::rt::sps_ci::CallVoidVoid
Runs a void() function in the executor, given its address.
Definition
CallSPSCI.h:41
llvm::orc::rt::sps_ci::CallVoidVoid::Name
static constexpr SymbolNameSpec Name
Definition
CallSPSCI.h:42
llvm::orc::rt::sps_ci::CallVoidVoid::SPSSig
void(shared::SPSExecutorAddr) SPSSig
Definition
CallSPSCI.h:44
Generated on
for LLVM by
1.14.0