This patch introduces a new directive that allow to parse/print attributes and types fully
qualified.
This is a follow-up to ee0908703d29 which introduces the eliding of the !dialect.mnemonic by default and allows to force to fully qualify each type/attribute
individually.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp | ||
---|---|---|
92 | shouldBeQualified? |
mlir/docs/Tutorials/DefiningAttributesAndTypes.md | ||
---|---|---|
523 | It does not mean "recursive" if this is what you're asking for |
LGTM after resolving comments. It's nice to be able to opt out for those that don't want the more implicit behavior.
mlir/docs/OpDefinitions.md | ||
---|---|---|
656 | ||
mlir/docs/Tutorials/DefiningAttributesAndTypes.md | ||
523–525 | ? I also found the wording including nesting a bit confusing. | |
mlir/test/lib/Dialect/Test/TestAttrDefs.td | ||
151–154 | ^ better matches how we format everywhere else, not sure why this file formats this way. | |
mlir/test/lib/Dialect/Test/TestTypeDefs.td | ||
80–83 | same comment as other file, but I guess this is fine for the sake of conformance with the other tests (we should NFC fix that though) | |
mlir/test/mlir-tblgen/op-format.mlir | ||
314–316 | ||
mlir/test/mlir-tblgen/testdialect-typedefs.mlir | ||
33–35 | semi unrelated, but could this just be a declaration? | |
mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp | ||
92–95 | Can you document these functions? | |
96–97 | ||
684–685 | In the failed(var) case, is that going to lead to a double error message? | |
mlir/tools/mlir-tblgen/OpFormatGen.cpp | ||
48 | Is this necessary? I wouldn't expect so, given that there is no element class added. | |
122–125 | Can you add documentation here? | |
3225–3227 | nit: I might have added braces here given that this statement stretches 3 lines. | |
3229 | Not sure why we are qualifying ::mlir:: in this code. I should really go through and clean this up. |