[all-commits] [llvm/llvm-project] 6ec387: [mlir] ODS: support TableGen dag objects to specif...
ftynse via All-commits
all-commits at lists.llvm.org
Wed Oct 21 02:43:13 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 6ec3872845dbb4d98a9e21ba43428ba2c023209b
https://github.com/llvm/llvm-project/commit/6ec3872845dbb4d98a9e21ba43428ba2c023209b
Author: Alex Zinenko <zinenko at google.com>
Date: 2020-10-21 (Wed, 21 Oct 2020)
Changed paths:
M mlir/docs/OpDefinitions.md
M mlir/include/mlir/IR/OpBase.td
M mlir/test/mlir-tblgen/op-decl.td
A mlir/test/mlir-tblgen/op-error.td
M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Log Message:
-----------
[mlir] ODS: support TableGen dag objects to specify OpBuilder parameters
Historically, custom builder specification in OpBuilder has been accepting the
formal parameter list for the builder method as a raw string containing C++.
While this worked well to connect the signature and the body, this became
problematic when ODS needs to manipulate the parameter list, e.g. to inject
OpBuilder or to trim default values when generating the definition. This has
also become inconsistent with other method declarations, in particular in
interface definitions.
Introduce the possibility to define OpBuilder formal parameters using a
TableGen dag similarly to other methods. Additionally, introduce a mechanism to
declare parameters with default values using an additional class. This
mechanism can be reused in other methods. The string-based builder signature
declaration is deprecated and will be removed after a transition period.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D89470
More information about the All-commits
mailing list