[all-commits] [llvm/llvm-project] eb1660: [mlir] Expand default arg builders to wrapped attr...
Jacques Pienaar via All-commits
all-commits at lists.llvm.org
Fri Nov 3 15:30:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eb166030a1b40567b7a83658a692f0eab99dde13
https://github.com/llvm/llvm-project/commit/eb166030a1b40567b7a83658a692f0eab99dde13
Author: Jacques Pienaar <jpienaar at google.com>
Date: 2023-11-03 (Fri, 03 Nov 2023)
Changed paths:
M mlir/test/mlir-tblgen/op-attribute.td
A mlir/test/mlir-tblgen/op-default-builder.td
M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Log Message:
-----------
[mlir] Expand default arg builders to wrapped attributes.
Previously only unwrapped values were considered for default values in
builders, expand to Attributes given the change to populate defaults. To avoid
overlap between wrapped and unwrapped, the starting index is incremented
depending on if the smallest starting index for default valued args can be
materialized in unwrapped form or not.
Given the above limitation this is pretty small change.
`optional` is unfortunately meant to also represent conditionally set which
means we cannot allow nullptr for all Attributes marked optional at the moment.
Reviewed By: Mogball
Differential Revision: https://reviews.llvm.org/D140705
More information about the All-commits
mailing list