class WrapperFunctionCall
Declaration
class WrapperFunctionCall { /* full declaration omitted */ };
Description
Represents a serialized wrapper function call. Serializing calls themselves allows us to batch them: We can make one "run-wrapper-functions" utility and send it a list of calls to run. The motivating use-case for this API is JITLink allocation actions, where we want to run multiple functions to finalize linked memory without having to make separate IPC calls for each one.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:628
Member Variables
- private orc::ExecutorAddr FnAddr
- private llvm::orc::shared::WrapperFunctionCall:: ArgDataBufferType ArgData
Method Overview
- public template <typename SPSSerializer, typename... ArgTs>static Expected<llvm::orc::shared::WrapperFunctionCall> Create(llvm::orc::ExecutorAddr FnAddr, const ArgTs &... Args)
- public WrapperFunctionCall()
- public WrapperFunctionCall(llvm::orc::ExecutorAddr FnAddr, llvm::orc::shared::WrapperFunctionCall::ArgDataBufferType ArgData)
- public const llvm::orc::shared::WrapperFunctionCall::ArgDataBufferType & getArgData() const
- public const llvm::orc::ExecutorAddr & getCallee() const
- public bool operator bool() const
- public shared::WrapperFunctionResult run() const
- public template <typename SPSRetT, typename RetT>std::enable_if_t<!std::is_same<SPSRetT, void>::value, Error> runWithSPSRet(RetT & RetVal) const
- public template <typename SPSRetT>std::enable_if_t<std::is_same<SPSRetT, void>::value, Error> runWithSPSRet() const
- public llvm::Error runWithSPSRetErrorMerged() const
Methods
¶template <typename SPSSerializer,
typename... ArgTs>
static Expected<
llvm::orc::shared::WrapperFunctionCall>
Create(llvm::orc::ExecutorAddr FnAddr,
const ArgTs&... Args)
template <typename SPSSerializer,
typename... ArgTs>
static Expected<
llvm::orc::shared::WrapperFunctionCall>
Create(llvm::orc::ExecutorAddr FnAddr,
const ArgTs&... Args)
Description
Create a WrapperFunctionCall using the given SPS serializer to serialize the arguments.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:635
Templates
- SPSSerializer
- ArgTs
Parameters
- llvm::orc::ExecutorAddr FnAddr
- const ArgTs&... Args
¶WrapperFunctionCall()
WrapperFunctionCall()
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:647
¶WrapperFunctionCall(
llvm::orc::ExecutorAddr FnAddr,
llvm::orc::shared::WrapperFunctionCall::
ArgDataBufferType ArgData)
WrapperFunctionCall(
llvm::orc::ExecutorAddr FnAddr,
llvm::orc::shared::WrapperFunctionCall::
ArgDataBufferType ArgData)
Description
Create a WrapperFunctionCall from a target function and arg buffer.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:650
Parameters
- llvm::orc::ExecutorAddr FnAddr
- llvm::orc::shared::WrapperFunctionCall:: ArgDataBufferType ArgData
¶const llvm::orc::shared::WrapperFunctionCall::
ArgDataBufferType&
getArgData() const
const llvm::orc::shared::WrapperFunctionCall::
ArgDataBufferType&
getArgData() const
Description
Returns the argument data.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:657
¶const llvm::orc::ExecutorAddr& getCallee() const
const llvm::orc::ExecutorAddr& getCallee() const
Description
Returns the address to be called.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:654
¶bool operator bool() const
bool operator bool() const
Description
WrapperFunctionCalls convert to true if the callee is non-null.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:660
¶shared::WrapperFunctionResult run() const
shared::WrapperFunctionResult run() const
Description
Run call returning raw WrapperFunctionResult.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:663
¶template <typename SPSRetT, typename RetT>
std::enable_if_t<
!std::is_same<SPSRetT, void>::value,
Error>
runWithSPSRet(RetT& RetVal) const
template <typename SPSRetT, typename RetT>
std::enable_if_t<
!std::is_same<SPSRetT, void>::value,
Error>
runWithSPSRet(RetT& RetVal) const
Description
Run call and deserialize result using SPS.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:673
Templates
- SPSRetT
- RetT
Parameters
- RetT& RetVal
¶template <typename SPSRetT>
std::enable_if_t<
std::is_same<SPSRetT, void>::value,
Error>
runWithSPSRet() const
template <typename SPSRetT>
std::enable_if_t<
std::is_same<SPSRetT, void>::value,
Error>
runWithSPSRet() const
Description
Overload for SPS functions returning void.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:688
Templates
- SPSRetT
¶llvm::Error runWithSPSRetErrorMerged() const
llvm::Error runWithSPSRetErrorMerged() const
Description
Run call and deserialize an SPSError result. SPSError returns and deserialization failures are merged into the returned error.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h:695