[ORC] Add TaskDispatch API and thread it through ExecutorProcessControl.
authorLang Hames <lhames@gmail.com>
Sat, 9 Oct 2021 00:12:06 +0000 (17:12 -0700)
committerLang Hames <lhames@gmail.com>
Mon, 11 Oct 2021 01:39:55 +0000 (18:39 -0700)
commitf34116168964be7886622e6f9b574f5c2d460ac9
treefb13fc94e1f06f55bdebf456390098a529f1f40d
parent77bc3ba3650eccde2f1cf7326e76eb6c14ed08a3
[ORC] Add TaskDispatch API and thread it through ExecutorProcessControl.

ExecutorProcessControl objects will now have a TaskDispatcher member which
should be used to dispatch work (in particular, handling incoming packets in
the implementation of remote EPC implementations like SimpleRemoteEPC).

The GenericNamedTask template can be used to wrap function objects that are
callable as 'void()' (along with an optional name to describe the task).
The makeGenericNamedTask functions can be used to create GenericNamedTask
instances without having to name the function object type.

In a future patch ExecutionSession will be updated to use the
ExecutorProcessControl's dispatcher, instead of its DispatchTaskFunction.
12 files changed:
llvm/include/llvm/ExecutionEngine/Orc/Core.h
llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h
llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h [new file with mode: 0644]
llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
llvm/lib/ExecutionEngine/Orc/Core.cpp
llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp [new file with mode: 0644]
llvm/tools/lli/lli.cpp
llvm/tools/llvm-jitlink/llvm-jitlink.cpp
llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
llvm/unittests/ExecutionEngine/Orc/TaskDispatchTest.cpp [new file with mode: 0644]