[ORC] Add optional RunPolicy to ExecutorProcessControl::callWrapperAsync.
authorLang Hames <lhames@gmail.com>
Sun, 10 Oct 2021 22:49:08 +0000 (15:49 -0700)
committerLang Hames <lhames@gmail.com>
Mon, 11 Oct 2021 03:41:59 +0000 (20:41 -0700)
commit4d7cea3d2e833209d06e201a273f97342035c196
tree714f9f781700838a5182166b9cb82a78bf512a58
parent2e6c92c5400e46e1b27033107560ed67ac25062d
[ORC] Add optional RunPolicy to ExecutorProcessControl::callWrapperAsync.

The callWrapperAsync and callSPSWrapperAsync methods take a handler object
that is run on the return value of the call when it is ready. The new RunPolicy
parameters allow clients to control how these handlers are run. If no policy is
specified then the handler will be packaged as a GenericNamedTask and dispatched
using the ExecutorProcessControl's TaskDispatch member. Callers can use the
ExecutorProcessControl::RunInPlace policy to cause the handler to be run
directly instead, which may be preferrable for simple handlers, or they can
write their own policy object (e.g. to dispatch as some other kind of Task,
rather than GenericNamedTask).
llvm/include/llvm/ExecutionEngine/Orc/Core.h
llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h
llvm/lib/ExecutionEngine/Orc/Core.cpp
llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp