The majority of dialects reimplement the same boilerplate over and over,
switching the default makes it for better discoverability and make it simpler
to implement new dialects.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/IR/Location.cpp | ||
---|---|---|
11 ↗ | (On Diff #400672) | It was needed originally before I disabled it in the .td file for this dialect. The generated printer/parser uses some AsmParser defined there. |
switching the default makes it for better discoverability
So too would making it unset by default (?) and flagging a warning at build time asking it to be explicitly set either way and explaining benefit of having it on (so no warning if 0). That is not a behavior change but pushes people in a better direction. Or it could simply be used to give folks a heads-up before flipping. Like a PSA but in code that they can see in their presubmit.
The dialects changed here can be done in separate changes from the default flips.
committing the dialect changes without changing the default would require to change the setting on each dialect individually back and forth, so I'd rather avoid the unnecessary churn here.
Tweak the ODS generators logic to have the decl/def generators in sync in their logic to decide when to emit or not the print/parse Type/Attribute methods.
address comments
mlir/lib/IR/BuiltinAttributes.cpp | ||
---|---|---|
14 ↗ | (On Diff #400672) | Strange, I thought I removed these... |