[all-commits] [llvm/llvm-project] de6d01: [mlir][tblgen] Add custom parsing and printing wit...
Jorn Tuyls via All-commits
all-commits at lists.llvm.org
Wed Apr 30 05:43:24 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: de6d010f4e3fbfdb54e257c496c16db30c6c0d91
https://github.com/llvm/llvm-project/commit/de6d010f4e3fbfdb54e257c496c16db30c6c0d91
Author: Jorn Tuyls <jtuyls at users.noreply.github.com>
Date: 2025-04-30 (Wed, 30 Apr 2025)
Changed paths:
M mlir/docs/DefiningDialects/AttributesAndTypes.md
A mlir/test/IR/custom-struct-attr-roundtrip.mlir
M mlir/test/lib/Dialect/Test/TestAttrDefs.td
M mlir/test/lib/Dialect/Test/TestAttributes.cpp
M mlir/test/mlir-tblgen/attr-or-type-format-invalid.td
M mlir/test/mlir-tblgen/attr-or-type-format.td
M mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
M mlir/tools/mlir-tblgen/FormatGen.cpp
M mlir/tools/mlir-tblgen/FormatGen.h
M mlir/tools/mlir-tblgen/OpFormatGen.cpp
Log Message:
-----------
[mlir][tblgen] Add custom parsing and printing within struct (#133939)
This PR extends the `struct` directive in tablegen to support nested
`custom` directives. Note that this assumes/verifies that that `custom`
directive has a single parameter.
This enables defining custom field parsing and printing functions if the
`struct` directive doesn't suffice. There is some existing potential
downstream usage for it:
https://github.com/openxla/stablehlo/blob/a3c7de92425e8035437dae67ab2318a82eca79a1/stablehlo/dialect/StablehloOps.cpp#L3102
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list