1//===---- OrcRTBridge.h -- Utils for interacting with orc-rt ----*- 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// Declares types and symbol names provided by the ORC runtime.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
14#define LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
15
16#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
17#include "llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h"
18#include "llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h"
19#include "llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h"
20
21namespace llvm {
22namespace orc {
23namespace rt {
24
25extern const char *SimpleExecutorDylibManagerInstanceName;
26extern const char *SimpleExecutorDylibManagerOpenWrapperName;
27extern const char *SimpleExecutorDylibManagerLookupWrapperName;
28
29extern const char *SimpleExecutorMemoryManagerInstanceName;
30extern const char *SimpleExecutorMemoryManagerReserveWrapperName;
31extern const char *SimpleExecutorMemoryManagerFinalizeWrapperName;
32extern const char *SimpleExecutorMemoryManagerDeallocateWrapperName;
33
34extern const char *ExecutorSharedMemoryMapperServiceInstanceName;
35extern const char *ExecutorSharedMemoryMapperServiceReserveWrapperName;
36extern const char *ExecutorSharedMemoryMapperServiceInitializeWrapperName;
37extern const char *ExecutorSharedMemoryMapperServiceDeinitializeWrapperName;
38extern const char *ExecutorSharedMemoryMapperServiceReleaseWrapperName;
39
40extern const char *MemoryWriteUInt8sWrapperName;
41extern const char *MemoryWriteUInt16sWrapperName;
42extern const char *MemoryWriteUInt32sWrapperName;
43extern const char *MemoryWriteUInt64sWrapperName;
44extern const char *MemoryWriteBuffersWrapperName;
45
46extern const char *RegisterEHFrameSectionWrapperName;
47extern const char *DeregisterEHFrameSectionWrapperName;
48
49extern const char *RunAsMainWrapperName;
50extern const char *RunAsVoidFunctionWrapperName;
51extern const char *RunAsIntFunctionWrapperName;
52
53using SPSSimpleExecutorDylibManagerOpenSignature =
54 shared::SPSExpected<shared::SPSExecutorAddr>(shared::SPSExecutorAddr,
55 shared::SPSString, uint64_t);
56
57using SPSSimpleExecutorDylibManagerLookupSignature =
58 shared::SPSExpected<shared::SPSSequence<shared::SPSExecutorSymbolDef>>(
59 shared::SPSExecutorAddr, shared::SPSExecutorAddr,
60 shared::SPSRemoteSymbolLookupSet);
61
62using SPSSimpleExecutorMemoryManagerReserveSignature =
63 shared::SPSExpected<shared::SPSExecutorAddr>(shared::SPSExecutorAddr,
64 uint64_t);
65using SPSSimpleExecutorMemoryManagerFinalizeSignature =
66 shared::SPSError(shared::SPSExecutorAddr, shared::SPSFinalizeRequest);
67using SPSSimpleExecutorMemoryManagerDeallocateSignature = shared::SPSError(
68 shared::SPSExecutorAddr, shared::SPSSequence<shared::SPSExecutorAddr>);
69
70// ExecutorSharedMemoryMapperService
71using SPSExecutorSharedMemoryMapperServiceReserveSignature =
72 shared::SPSExpected<
73 shared::SPSTuple<shared::SPSExecutorAddr, shared::SPSString>>(
74 shared::SPSExecutorAddr, uint64_t);
75using SPSExecutorSharedMemoryMapperServiceInitializeSignature =
76 shared::SPSExpected<shared::SPSExecutorAddr>(
77 shared::SPSExecutorAddr, shared::SPSExecutorAddr,
78 shared::SPSSharedMemoryFinalizeRequest);
79using SPSExecutorSharedMemoryMapperServiceDeinitializeSignature =
80 shared::SPSError(shared::SPSExecutorAddr,
81 shared::SPSSequence<shared::SPSExecutorAddr>);
82using SPSExecutorSharedMemoryMapperServiceReleaseSignature = shared::SPSError(
83 shared::SPSExecutorAddr, shared::SPSSequence<shared::SPSExecutorAddr>);
84
85using SPSRunAsMainSignature = int64_t(shared::SPSExecutorAddr,
86 shared::SPSSequence<shared::SPSString>);
87using SPSRunAsVoidFunctionSignature = int32_t(shared::SPSExecutorAddr);
88using SPSRunAsIntFunctionSignature = int32_t(shared::SPSExecutorAddr, int32_t);
89} // end namespace rt
90} // end namespace orc
91} // end namespace llvm
92
93#endif // LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
94

source code of llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h