14#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_SIMPLEREMOTEEPCUTILS_H
15#define LLVM_EXECUTIONENGINE_ORC_SHARED_SIMPLEREMOTEEPCUTILS_H
32namespace SimpleRemoteEPCDefaultBootstrapSymbolNames {
129 : C(C), InFD(InFD), OutFD(OutFD) {}
131 Error readBytes(
char *Dst,
size_t Size,
bool *IsEOF =
nullptr);
132 int writeBytes(
const char *Src,
size_t Size);
136 SimpleRemoteEPCTransportClient &C;
137 std::thread ListenerThread;
139 std::atomic<bool> Disconnected{
false};
210 return SPSSimpleRemoteEPCExecutorInfo::AsArgList ::size(
211 SI.TargetTriple, SI.PageSize, SI.BootstrapMap, SI.BootstrapSymbols);
216 return SPSSimpleRemoteEPCExecutorInfo::AsArgList ::serialize(
217 OB, SI.TargetTriple, SI.PageSize, SI.BootstrapMap, SI.BootstrapSymbols);
221 return SPSSimpleRemoteEPCExecutorInfo::AsArgList ::deserialize(
222 IB, SI.TargetTriple, SI.PageSize, SI.BootstrapMap, SI.BootstrapSymbols);
This file defines the StringMap class.
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.
void disconnect() override
Trigger disconnection from the transport.
static Expected< std::unique_ptr< FDSimpleRemoteEPCTransport > > Create(SimpleRemoteEPCTransportClient &C, int InFD, int OutFD)
Create a FDSimpleRemoteEPCTransport using the given FDs for reading (InFD) and writing (OutFD).
Error start() override
Called during setup of the client to indicate that the client is ready to receive messages.
static Expected< std::unique_ptr< FDSimpleRemoteEPCTransport > > Create(SimpleRemoteEPCTransportClient &C, int FD)
Create a FDSimpleRemoteEPCTransport using the given FD for both reading and writing.
Error sendMessage(SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, ExecutorAddr TagAddr, ArrayRef< char > ArgBytes) override
Send a SimpleRemoteEPC message.
~FDSimpleRemoteEPCTransport() override
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.
const char * DispatchFnName
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