File indexing completed on 2026-05-10 08:43:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef LLVM_EXECUTIONENGINE_ORC_EPCGENERICMEMORYACCESS_H
0019 #define LLVM_EXECUTIONENGINE_ORC_EPCGENERICMEMORYACCESS_H
0020
0021 #include "llvm/ExecutionEngine/Orc/Core.h"
0022
0023 namespace llvm {
0024 namespace orc {
0025
0026 class EPCGenericMemoryAccess : public ExecutorProcessControl::MemoryAccess {
0027 public:
0028
0029 struct FuncAddrs {
0030 ExecutorAddr WriteUInt8s;
0031 ExecutorAddr WriteUInt16s;
0032 ExecutorAddr WriteUInt32s;
0033 ExecutorAddr WriteUInt64s;
0034 ExecutorAddr WriteBuffers;
0035 ExecutorAddr WritePointers;
0036 };
0037
0038
0039
0040 EPCGenericMemoryAccess(ExecutorProcessControl &EPC, FuncAddrs FAs)
0041 : EPC(EPC), FAs(FAs) {}
0042
0043 void writeUInt8sAsync(ArrayRef<tpctypes::UInt8Write> Ws,
0044 WriteResultFn OnWriteComplete) override {
0045 using namespace shared;
0046 EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessUInt8Write>)>(
0047 FAs.WriteUInt8s, std::move(OnWriteComplete), Ws);
0048 }
0049
0050 void writeUInt16sAsync(ArrayRef<tpctypes::UInt16Write> Ws,
0051 WriteResultFn OnWriteComplete) override {
0052 using namespace shared;
0053 EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessUInt16Write>)>(
0054 FAs.WriteUInt16s, std::move(OnWriteComplete), Ws);
0055 }
0056
0057 void writeUInt32sAsync(ArrayRef<tpctypes::UInt32Write> Ws,
0058 WriteResultFn OnWriteComplete) override {
0059 using namespace shared;
0060 EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessUInt32Write>)>(
0061 FAs.WriteUInt32s, std::move(OnWriteComplete), Ws);
0062 }
0063
0064 void writeUInt64sAsync(ArrayRef<tpctypes::UInt64Write> Ws,
0065 WriteResultFn OnWriteComplete) override {
0066 using namespace shared;
0067 EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessUInt64Write>)>(
0068 FAs.WriteUInt64s, std::move(OnWriteComplete), Ws);
0069 }
0070
0071 void writeBuffersAsync(ArrayRef<tpctypes::BufferWrite> Ws,
0072 WriteResultFn OnWriteComplete) override {
0073 using namespace shared;
0074 EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessBufferWrite>)>(
0075 FAs.WriteBuffers, std::move(OnWriteComplete), Ws);
0076 }
0077
0078 void writePointersAsync(ArrayRef<tpctypes::PointerWrite> Ws,
0079 WriteResultFn OnWriteComplete) override {
0080 using namespace shared;
0081 EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessPointerWrite>)>(
0082 FAs.WritePointers, std::move(OnWriteComplete), Ws);
0083 }
0084
0085 private:
0086 ExecutorProcessControl &EPC;
0087 FuncAddrs FAs;
0088 };
0089
0090 }
0091 }
0092
0093 #endif