Skip to content

Commit 4162aef

Browse files
committed
Revert "Re-apply 5acd471, Add a shared-memory based orc::MemoryMapper, with fixes."
This reverts commit 32d8d23. Reason: Broke the UBSan buildbots. See more details on Phabricator: https://reviews.llvm.org/D128544
1 parent 00b5a6e commit 4162aef

File tree

10 files changed

+0
-872
lines changed

10 files changed

+0
-872
lines changed

Diff for: llvm/include/llvm/ExecutionEngine/Orc/MemoryMapper.h

-41
Original file line numberDiff line numberDiff line change
@@ -109,47 +109,6 @@ class InProcessMemoryMapper final : public MemoryMapper {
109109
AllocationMap Allocations;
110110
};
111111

112-
class SharedMemoryMapper final : public MemoryMapper {
113-
public:
114-
struct SymbolAddrs {
115-
ExecutorAddr Instance;
116-
ExecutorAddr Reserve;
117-
ExecutorAddr Initialize;
118-
ExecutorAddr Deinitialize;
119-
ExecutorAddr Release;
120-
};
121-
122-
SharedMemoryMapper(ExecutorProcessControl &EPC, SymbolAddrs SAs)
123-
: EPC(EPC), SAs(SAs) {}
124-
125-
void reserve(size_t NumBytes, OnReservedFunction OnReserved) override;
126-
127-
char *prepare(ExecutorAddr Addr, size_t ContentSize) override;
128-
129-
void initialize(AllocInfo &AI, OnInitializedFunction OnInitialized) override;
130-
131-
void deinitialize(ArrayRef<ExecutorAddr> Allocations,
132-
OnDeinitializedFunction OnDeInitialized) override;
133-
134-
void release(ArrayRef<ExecutorAddr> Reservations,
135-
OnReleasedFunction OnRelease) override;
136-
137-
~SharedMemoryMapper() override;
138-
139-
private:
140-
struct Reservation {
141-
void *LocalAddr;
142-
size_t Size;
143-
};
144-
145-
ExecutorProcessControl &EPC;
146-
SymbolAddrs SAs;
147-
148-
std::mutex Mutex;
149-
150-
std::map<ExecutorAddr, Reservation> Reservations;
151-
};
152-
153112
} // namespace orc
154113
} // end namespace llvm
155114

Diff for: llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h

-21
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ extern const char *SimpleExecutorMemoryManagerReserveWrapperName;
3131
extern const char *SimpleExecutorMemoryManagerFinalizeWrapperName;
3232
extern const char *SimpleExecutorMemoryManagerDeallocateWrapperName;
3333

34-
extern const char *ExecutorSharedMemoryMapperServiceInstanceName;
35-
extern const char *ExecutorSharedMemoryMapperServiceReserveWrapperName;
36-
extern const char *ExecutorSharedMemoryMapperServiceInitializeWrapperName;
37-
extern const char *ExecutorSharedMemoryMapperServiceDeinitializeWrapperName;
38-
extern const char *ExecutorSharedMemoryMapperServiceReleaseWrapperName;
39-
4034
extern const char *MemoryWriteUInt8sWrapperName;
4135
extern const char *MemoryWriteUInt16sWrapperName;
4236
extern const char *MemoryWriteUInt32sWrapperName;
@@ -64,21 +58,6 @@ using SPSSimpleExecutorMemoryManagerFinalizeSignature =
6458
using SPSSimpleExecutorMemoryManagerDeallocateSignature = shared::SPSError(
6559
shared::SPSExecutorAddr, shared::SPSSequence<shared::SPSExecutorAddr>);
6660

67-
// ExecutorSharedMemoryMapperService
68-
using SPSExecutorSharedMemoryMapperServiceReserveSignature =
69-
shared::SPSExpected<
70-
shared::SPSTuple<shared::SPSExecutorAddr, shared::SPSString>>(
71-
shared::SPSExecutorAddr, uint64_t);
72-
using SPSExecutorSharedMemoryMapperServiceInitializeSignature =
73-
shared::SPSExpected<shared::SPSExecutorAddr>(shared::SPSExecutorAddr,
74-
shared::SPSExecutorAddr,
75-
shared::SPSFinalizeRequest);
76-
using SPSExecutorSharedMemoryMapperServiceDeinitializeSignature =
77-
shared::SPSError(shared::SPSExecutorAddr,
78-
shared::SPSSequence<shared::SPSExecutorAddr>);
79-
using SPSExecutorSharedMemoryMapperServiceReleaseSignature = shared::SPSError(
80-
shared::SPSExecutorAddr, shared::SPSSequence<shared::SPSExecutorAddr>);
81-
8261
using SPSRunAsMainSignature = int64_t(shared::SPSExecutorAddr,
8362
shared::SPSSequence<shared::SPSString>);
8463

Diff for: llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/ExecutorSharedMemoryMapperService.h

-78
This file was deleted.

Diff for: llvm/lib/ExecutionEngine/Orc/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
if( CMAKE_HOST_UNIX AND HAVE_LIBRT )
2-
set(rt_lib rt)
3-
endif()
4-
51
add_llvm_component_library(LLVMOrcJIT
62
CompileOnDemandLayer.cpp
73
CompileUtils.cpp
@@ -49,7 +45,6 @@ add_llvm_component_library(LLVMOrcJIT
4945

5046
LINK_LIBS
5147
${LLVM_PTHREAD_LIB}
52-
${rt_lib}
5348

5449
LINK_COMPONENTS
5550
Core

0 commit comments

Comments
 (0)