[PATCH] D80607: Remove error-prone mlir::ExecutionEngine::invoke overload.
Sean Silva via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 27 13:37:27 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb27738231161: Remove error-prone mlir::ExecutionEngine::invoke overload. (authored by silvas).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80607/new/
https://reviews.llvm.org/D80607
Files:
mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
Index: mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
===================================================================
--- mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
+++ mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
@@ -94,16 +94,9 @@
/// pointer to it. Propagates errors in case of failure.
llvm::Expected<void (*)(void **)> lookup(StringRef name) const;
- /// Invokes the function with the given name passing it the list of arguments.
- /// The arguments are accepted by lvalue-reference since the packed function
- /// interface expects a list of non-null pointers.
- template <typename... Args>
- llvm::Error invoke(StringRef name, Args &... args);
-
/// Invokes the function with the given name passing it the list of arguments
- /// as a list of opaque pointers. This is the arity-agnostic equivalent of
- /// the templated `invoke`.
- llvm::Error invoke(StringRef name, MutableArrayRef<void *> args);
+ /// as a list of opaque pointers.
+ llvm::Error invoke(StringRef name, MutableArrayRef<void *> args = llvm::None);
/// Set the target triple on the module. This is implicitly done when creating
/// the engine.
@@ -135,19 +128,6 @@
llvm::JITEventListener *perfListener;
};
-template <typename... Args>
-llvm::Error ExecutionEngine::invoke(StringRef name, Args &... args) {
- auto expectedFPtr = lookup(name);
- if (!expectedFPtr)
- return expectedFPtr.takeError();
- auto fptr = *expectedFPtr;
-
- SmallVector<void *, 8> packedArgs{static_cast<void *>(&args)...};
- (*fptr)(packedArgs.data());
-
- return llvm::Error::success();
-}
-
} // end namespace mlir
#endif // MLIR_EXECUTIONENGINE_EXECUTIONENGINE_H_
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80607.266652.patch
Type: text/x-patch
Size: 1689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200527/5eee0007/attachment.bin>
More information about the llvm-commits
mailing list