diff --git a/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h b/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h --- a/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h +++ b/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h @@ -94,16 +94,9 @@ /// pointer to it. Propagates errors in case of failure. llvm::Expected 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 - 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 args); + /// as a list of opaque pointers. + llvm::Error invoke(StringRef name, MutableArrayRef 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 -llvm::Error ExecutionEngine::invoke(StringRef name, Args &... args) { - auto expectedFPtr = lookup(name); - if (!expectedFPtr) - return expectedFPtr.takeError(); - auto fptr = *expectedFPtr; - - SmallVector packedArgs{static_cast(&args)...}; - (*fptr)(packedArgs.data()); - - return llvm::Error::success(); -} - } // end namespace mlir #endif // MLIR_EXECUTIONENGINE_EXECUTIONENGINE_H_