[all-commits] [llvm/llvm-project] 3df6ca: [mlir] ODS: require DefaultValuedAttr to be const-...
ftynse via All-commits
all-commits at lists.llvm.org
Tue Feb 8 00:31:27 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3df6cadec45ec3db8e31706bd7f5015fd2543695
https://github.com/llvm/llvm-project/commit/3df6cadec45ec3db8e31706bd7f5015fd2543695
Author: Alex Zinenko <zinenko at google.com>
Date: 2022-02-08 (Tue, 08 Feb 2022)
Changed paths:
M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Log Message:
-----------
[mlir] ODS: require DefaultValuedAttr to be const-buildable
ODS provides a mechanism for defalut-valued attributes based on a wrapper
TableGen class that is recognized by mlir-tblgen. Such attributes, if not set
on the operaiton, can be construted on-the-fly in their getter given a constant
value. In order for this construction to work, the attribute specificaiton in
ODS must set the constBuilderCall field correctly. This has not been verified,
which could lead to invalid C++ code being generated by mlir-tblgen.
Closes #53588.
Reviewed By: rriddle, mehdi_amini
Differential Revision: https://reviews.llvm.org/D119113
Commit: 68784267b1b378a1043c473e43fd37ada2507314
https://github.com/llvm/llvm-project/commit/68784267b1b378a1043c473e43fd37ada2507314
Author: Alex Zinenko <zinenko at google.com>
Date: 2022-02-08 (Tue, 08 Feb 2022)
Changed paths:
M mlir/include/mlir/IR/OpBase.td
Log Message:
-----------
[mlir] Move constBuidlerCall from to ArrayAttrBase
This makes it applicable to both ArrayAttr and its typed subclasses instead of
only the latter. There is no good reason why ArrayAttr shouldn't be
const-buildable while its typed subclasses are, this was likely just an
omission.
Depends On D119113
Reviewed By: rriddle, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D119114
Compare: https://github.com/llvm/llvm-project/compare/ec642ceebc1a...68784267b1b3
More information about the All-commits
mailing list