[all-commits] [llvm/llvm-project] b27738: Remove error-prone mlir::ExecutionEngine::invoke o...
Sean Silva via All-commits
all-commits at lists.llvm.org
Wed May 27 13:31:46 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b2773823116157aa73ea4ac01270b22042d6bb42
https://github.com/llvm/llvm-project/commit/b2773823116157aa73ea4ac01270b22042d6bb42
Author: Sean Silva <silvasean at google.com>
Date: 2020-05-27 (Wed, 27 May 2020)
Changed paths:
M mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
Log Message:
-----------
Remove error-prone mlir::ExecutionEngine::invoke overload.
I just spent a bunch of time debugging a mysterious bug that ended being due to my SmallVector getting passed to the Args&... overload instead of the MutableArrayRef overload, with disastrous results.
I appreciate the intent of this API, but for a function that does a bunch of unsafe casts, adding in potential overload confusion is just too much C++ footgun. If we end up needing this functionality, having something like a separate `packArgs(Args&...) -> SmallVector` overload would be preferable.
Turns out this API is unused and untested (even out of tree as far as I can tell, modulo the optional passing of no args to the other invoke as I fixed in this patch), so it's an easy fix -- just delete it and touch up the other overload.
Differential Revision: https://reviews.llvm.org/D80607
More information about the All-commits
mailing list