The current documentation is super old, crusty, and at times wrong. This commit
rewrites the documentation to focus on the TableGen declarative definition,
expounds on various components, and moves the doc out of Tutorials/ and into
a new top level AttributesAndTypes.md doc. As part of this, the AttrDef/TypeDef
documentation in OpDefinitions.md is removed.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Some bits of the docs were rewritten more than others, so it's likely I missed some hardcoded references to just "types" and other things that are just out of date.
mlir/docs/AttributesAndTypes.md | ||
---|---|---|
3 | extensions is a bit confusing here (and contrasts with title), couldn't this be phrased same as title? | |
7 | This seems like something that is either assumed or needs to be said in all docs. | |
15 | Nit: the C++ data structure used to represent them are value-typed. This may also be confusing considering Value which these are not allowed to have. | |
18 | This feels like a bit of dive into implementation details right of the bat. I think you should include a sentence or two from langref about these to set stage, and you could then move this later post defining and to a using section. | |
23 | proper is a weasel word, please remove. | |
29 | implicit internal feels magical, these are pointers to memory in MLIRContext with helper functions. | |
37 | I think this may be useful place to make.the distinction between the Attribute and AttrDef hierarchies in ODS, folks have ran into that and been confused. | |
41 | May also be good to highlight that these are normally in separate files and why we do that. | |
63 | This feels too much like copy pasta from an existing project. | |
70 | Comment explaining what this does and how it would look and pointing to where the syntax is defined? | |
71 | Comment? | |
82 | I feel this can be reduced to "It's common ... same as for Types." But fine either way. | |
126 | Used for by? | |
127 | s/!/./ | |
135 | Link to special? | |
153 | Move this up as this would be preferred/easiest to use. | |
161 | Additional functional? | |
176 | It may be a bug, it makes an assumption about lifetimes which is not enforced. |
extensions is a bit confusing here (and contrasts with title), couldn't this be phrased same as title?