[llvm] e9014d9 - [ORC] Run incoming jit-dispatch calls via the TaskDispatcher in SimpleRemoteEPC.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 1 15:49:33 PDT 2021
Author: Lang Hames
Date: 2021-11-01T15:49:14-07:00
New Revision: e9014d97436505bdfb53aca33e7ed4cdbf3da1e3
URL: https://github.com/llvm/llvm-project/commit/e9014d97436505bdfb53aca33e7ed4cdbf3da1e3
DIFF: https://github.com/llvm/llvm-project/commit/e9014d97436505bdfb53aca33e7ed4cdbf3da1e3.diff
LOG: [ORC] Run incoming jit-dispatch calls via the TaskDispatcher in SimpleRemoteEPC.
Handlers for jit-dispatch calls are allowed to make their own EPC calls, so we
don't want to run these on the handler thread.
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp b/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
index 734e709b93844..47364a92a4517 100644
--- a/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
@@ -374,13 +374,18 @@ void SimpleRemoteEPC::handleCallWrapper(
uint64_t RemoteSeqNo, ExecutorAddr TagAddr,
SimpleRemoteEPCArgBytesVector ArgBytes) {
assert(ES && "No ExecutionSession attached");
- ES->runJITDispatchHandler(
- [this, RemoteSeqNo](shared::WrapperFunctionResult WFR) {
- if (auto Err = sendMessage(SimpleRemoteEPCOpcode::Result, RemoteSeqNo,
- ExecutorAddr(), {WFR.data(), WFR.size()}))
- getExecutionSession().reportError(std::move(Err));
+ D->dispatch(makeGenericNamedTask(
+ [this, RemoteSeqNo, TagAddr, ArgBytes = std::move(ArgBytes)]() {
+ ES->runJITDispatchHandler(
+ [this, RemoteSeqNo](shared::WrapperFunctionResult WFR) {
+ if (auto Err =
+ sendMessage(SimpleRemoteEPCOpcode::Result, RemoteSeqNo,
+ ExecutorAddr(), {WFR.data(), WFR.size()}))
+ getExecutionSession().reportError(std::move(Err));
+ },
+ TagAddr.getValue(), ArgBytes);
},
- TagAddr.getValue(), ArgBytes);
+ "callWrapper task"));
}
Error SimpleRemoteEPC::handleHangup(SimpleRemoteEPCArgBytesVector ArgBytes) {
More information about the llvm-commits
mailing list