We don't actually have any documentation today for how to
declaratively define a dialect. This commit rectifies that and properly
documents how to define a Dialect in tablegen, and details all of
the possible fields.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/docs/DefiningDialects.md | ||
---|---|---|
30 | I'd remove the second powerful here, feels too much for one sentence. I'm tempted to say we should mention maintenance as historically I believe the ODS definitions have changed less than the C++ side and also we try to autogenerate many of these details. | |
41 | Interfaces I think it is even a requirement, else you end up with duplicate registrations (for the above, in case you reuse types in dialects you at least end with messy docs, but not sure beyond that) | |
90 | Soon we can use C++17 nested namespace notation :-) | |
104 | s/main// ? | |
126 | Also we may start catering for some of those long tail cases and break this code as we have no visibility into it during generation. | |
133 | s/this// ? (Just too many this in this sentence) | |
136 | I would in life "for canonicalization" into the HREF text | |
139 | Constant materialization logic can then defined in the source file ? | |
146 | Operation generated? | |
154 | A little bit asymmetric to have custom destructor but not constructor. | |
193 | Generate feels weird here (and below) | |
288 | Also it goes from snake_style to lowerCamel (well technically UpperCamel with get/set prefix resulting in lowerCamel). So function_name goes to getFunctionName |
mlir/docs/DefiningDialects.md | ||
---|---|---|
41 | Yeah, interfaces I think are the most common pitfall of this. I think it could happen with other constructs though, but slightly more difficult (or at least, less common). | |
90 | I cannot wait to move out of C++14!! | |
154 | Yeah, I think that's because we have the initialize method that's invoked by the constructor. |
I'd remove the second powerful here, feels too much for one sentence.
I'm tempted to say we should mention maintenance as historically I believe the ODS definitions have changed less than the C++ side and also we try to autogenerate many of these details.