14#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_SIMPLEREMOTEEPCUTILS_H
15#define LLVM_EXECUTIONENGINE_ORC_SHARED_SIMPLEREMOTEEPCUTILS_H
33namespace SimpleRemoteEPCDefaultBootstrapSymbolNames {
115 return Create(
C, FD, FD);
120 Error start()
override;
125 void disconnect()
override;
130 :
C(
C), InFD(InFD), OutFD(OutFD) {}
132 Error readBytes(
char *Dst,
size_t Size,
bool *IsEOF =
nullptr);
133 int writeBytes(
const char *Src,
size_t Size);
137 SimpleRemoteEPCTransportClient &
C;
138 std::thread ListenerThread;
140 std::atomic<bool> Disconnected{
false};
211 return SPSSimpleRemoteEPCExecutorInfo::AsArgList ::size(
212 SI.TargetTriple, SI.PageSize, SI.BootstrapMap, SI.BootstrapSymbols);
217 return SPSSimpleRemoteEPCExecutorInfo::AsArgList ::serialize(
218 OB, SI.TargetTriple, SI.PageSize, SI.BootstrapMap, SI.BootstrapSymbols);
222 return SPSSimpleRemoteEPCExecutorInfo::AsArgList ::deserialize(
223 IB, SI.TargetTriple, SI.PageSize, SI.BootstrapMap, SI.BootstrapSymbols);
This file defines the StringMap class.
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Represents an address in the executor process.
Uses read/write on FileDescriptors for transport.
static Expected< std::unique_ptr< FDSimpleRemoteEPCTransport > > Create(SimpleRemoteEPCTransportClient &C, int FD)
Create a FDSimpleRemoteEPCTransport using the given FD for both reading and writing.
virtual Expected< HandleMessageAction > handleMessage(SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, ExecutorAddr TagAddr, SimpleRemoteEPCArgBytesVector ArgBytes)=0
Handle receipt of a message.
virtual void handleDisconnect(Error Err)=0
Handle a disconnection from the underlying transport.
virtual ~SimpleRemoteEPCTransportClient()
virtual ~SimpleRemoteEPCTransport()
virtual void disconnect()=0
Trigger disconnection from the transport.
virtual Error sendMessage(SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, ExecutorAddr TagAddr, ArrayRef< char > ArgBytes)=0
Send a SimpleRemoteEPC message.
virtual Error start()=0
Called during setup of the client to indicate that the client is ready to receive messages.
A utility class for serializing to a blob from a variadic list.
SPS tag type for expecteds, which are either a T or a string representing an error.
Output char buffer with overflow check.
SPS tag type for sequences.
static size_t serialize(SPSOutputBuffer &OB, const RemoteSymbolLookupSetElement &V)
static size_t deserialize(SPSInputBuffer &IB, RemoteSymbolLookupSetElement &V)
static size_t size(const RemoteSymbolLookupSetElement &V)
static size_t serialize(SPSOutputBuffer &OB, const RemoteSymbolLookup &V)
static size_t size(const RemoteSymbolLookup &V)
static size_t deserialize(SPSInputBuffer &IB, RemoteSymbolLookup &V)
static bool deserialize(SPSInputBuffer &IB, SimpleRemoteEPCExecutorInfo &SI)
static bool serialize(SPSOutputBuffer &OB, const SimpleRemoteEPCExecutorInfo &SI)
static size_t size(const SimpleRemoteEPCExecutorInfo &SI)
Specialize to describe how to serialize/deserialize to/from the given concrete type.
LLVM_ABI const char * DispatchFnName
LLVM_ABI const char * ExecutorSessionObjectName
SPSSequence< char > SPSString
SPS tag type for strings, which are equivalent to sequences of chars.
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
This is an optimization pass for GlobalISel generic memory operations.
RemoteSymbolLookupSet Symbols
StringMap< ExecutorAddr > BootstrapSymbols
StringMap< std::vector< char > > BootstrapMap