[all-commits] [llvm/llvm-project] 595d78: [MLIR][ODS] Check hasProperties when generating po...
Billy Zhu via All-commits
all-commits at lists.llvm.org
Thu Jan 18 21:57:32 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 595d780b492d3de3f5653851e7d64c122472d71a
https://github.com/llvm/llvm-project/commit/595d780b492d3de3f5653851e7d64c122472d71a
Author: Billy Zhu <billyzhu at modular.com>
Date: 2024-01-18 (Thu, 18 Jan 2024)
Changed paths:
M mlir/test/mlir-tblgen/op-attribute.td
M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Log Message:
-----------
[MLIR][ODS] Check hasProperties when generating populateDefaultAttrs (#78525)
Currently ODS generates `populateDefaultAttrs` or
`populateDefaultProperties` based on whether the dialect opted into
usePropertiesForAttributes. But since individual ops might get opted
into using properties (as long as it has one property), it should
actually just check whether the op itself uses properties. Otherwise
`populateDefaultAttrs` will overwrite existing attrs inside properties
when creating an op. Understandably this becomes moot once everything
switches over to using properties, but this fixes it for now.
This PR makes ODS generate `populateDefaultProperties` as long as the op
itself uses properties.
More information about the All-commits
mailing list