#
e0c3b94c |
| 15-May-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir] Restrict dialect doc gen to a single dialect
In the overwhelmingly majority of cases only one dialect is generated at a time anyways, and this restriction more easily catches user error when
[mlir] Restrict dialect doc gen to a single dialect
In the overwhelmingly majority of cases only one dialect is generated at a time anyways, and this restriction more easily catches user error when multiple dialects might be generated. We hit this semi-recently with the PDL dialect, and circt+other downstream users are also actively hitting this as well.
Differential Revision: https://reviews.llvm.org/D125651
show more ...
|
#
0be38d4f |
| 04-Apr-2022 |
Alex Zinenko <zinenko@google.com> |
[mlir][ods] Add description to Attr and ensure doc generation
Add the description textual field to the Attr ODS class to mirror an identical field in the Type ODS class. Add support for generating d
[mlir][ods] Add description to Attr and ensure doc generation
Add the description textual field to the Attr ODS class to mirror an identical field in the Type ODS class. Add support for generating documentation for attribute constraints defined using this field. This ensures mlir-tblgen produces at least some documentation for dialects that only define attribute constraints, such as DLTI.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D123024
show more ...
|
#
23e3cbe2 |
| 12-Mar-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir] Refactor how parser/printers are specified for AttrDef/TypeDef
There is currently an awkwardly complex set of rules for how a parser/printer is generated for AttrDef/TypeDef. It can change de
[mlir] Refactor how parser/printers are specified for AttrDef/TypeDef
There is currently an awkwardly complex set of rules for how a parser/printer is generated for AttrDef/TypeDef. It can change depending on if a mnemonic was specified, if there are parameters, if using the assemblyFormat, if individual parser/printer code blocks were specified, etc. This commit refactors this to make what the attribute/type wants more explicit, and to better align with how formats are specified for operations.
Firstly, the parser/printer code blocks are removed in favor of a `hasCustomAssemblyFormat` bit field. This aligns with the operation format specification (and is nice to remove code blocks from ODS).
This commit also adds a requirement to explicitly set `assemblyFormat` or `hasCustomAssemblyFormat` when the mnemonic is set and the attr/type has no parameters. This removes the weird implicit matrix of behavior, and also encourages the author to make a conscious choice of either C++ or declarative format instead of implicitly opting them into the C++ format (we should be pushing towards declarative when possible).
Differential Revision: https://reviews.llvm.org/D121505
show more ...
|
#
1d7120c6 |
| 28-Jan-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir] Split out AttrDef/TypeDef and pattern constructs from OpBase.td
OpBase.td has formed into a huge monolith of all ODS constructs. This commits starts to rectify that by splitting out some cons
[mlir] Split out AttrDef/TypeDef and pattern constructs from OpBase.td
OpBase.td has formed into a huge monolith of all ODS constructs. This commits starts to rectify that by splitting out some constructs to their own .td files.
Differential Revision: https://reviews.llvm.org/D118636
show more ...
|
#
78fdbdbf |
| 18-Jan-2022 |
Mehdi Amini <joker.eph@gmail.com> |
Use reference for large object passed by value at the moment in MLIR TableGen (NFC)
Also make the ODS Operator class have const iterator, and use const references for existing API taking Operator by
Use reference for large object passed by value at the moment in MLIR TableGen (NFC)
Also make the ODS Operator class have const iterator, and use const references for existing API taking Operator by reference.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D117516
show more ...
|
#
1fc096af |
| 02-Jan-2022 |
Mehdi Amini <joker.eph@gmail.com> |
Apply clang-tidy fixes for performance-unnecessary-value-param to MLIR (NFC)
Reviewed By: Mogball
Differential Revision: https://reviews.llvm.org/D116250
|
#
89de9cc8 |
| 23-Dec-2021 |
Mehdi Amini <joker.eph@gmail.com> |
Apply clang-tidy fixes for performance-for-range-copy to MLIR (NFC)
Differential Revision: https://reviews.llvm.org/D116248
|
#
ca6bd9cd |
| 30-Nov-2021 |
Mogball <jeffniu22@gmail.com> |
[mlir][ods] AttrOrTypeGen uses Class
AttrOrType def generator uses `Class` code gen helper, instead of naked raw_ostream.
Depends on D113714 and D114807
Reviewed By: rriddle
Differential Revision
[mlir][ods] AttrOrTypeGen uses Class
AttrOrType def generator uses `Class` code gen helper, instead of naked raw_ostream.
Depends on D113714 and D114807
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D113715
show more ...
|
#
468581f1 |
| 11-Nov-2021 |
Jacques Pienaar <jpienaar@google.com> |
[mlir] Fix unused variable waraning in OpDocGen
|
#
ec0b53d4 |
| 11-Nov-2021 |
Jacques Pienaar <jpienaar@google.com> |
[mlir] Add traits, interfaces, effects to generated docs
Simply emit traits, interfaces & effects (with some minimal formatting) to the generated docs to make this information easier to find in the
[mlir] Add traits, interfaces, effects to generated docs
Simply emit traits, interfaces & effects (with some minimal formatting) to the generated docs to make this information easier to find in the docs.
Differential Revision: https://reviews.llvm.org/D113539
show more ...
|
#
a232a48d |
| 20-Aug-2021 |
Jacques Pienaar <jpienaar@google.com> |
[mlir][ods] Skip adding TOC in doc gen when present
Enables adding a TOC in the description to be able to interleave documentation before and after the TOC.
|
#
90ae4d90 |
| 15-Apr-2021 |
Mehdi Amini <joker.eph@gmail.com> |
Change add_mlir_doc CMake macro to take the tablegen command as last argument to allow extra flags
This is useful for expressing specific table-gen options, like selecting a particular dialect to pr
Change add_mlir_doc CMake macro to take the tablegen command as last argument to allow extra flags
This is useful for expressing specific table-gen options, like selecting a particular dialect to print. Use it to fix the documentation for the `pdl_interp` dialect which is now generating the first dialect it finds in its input which is `pdl`.
Differential Revision: https://reviews.llvm.org/D100517
show more ...
|
#
96caf381 |
| 06-Apr-2021 |
Jacques Pienaar <jpienaar@google.com> |
[mlir] Hoist out getRequestedOpDefinitions helper
Enables performing the same filtering in the op doc definition as in the op definition generator.
Differential Revision: https://reviews.llvm.org/D
[mlir] Hoist out getRequestedOpDefinitions helper
Enables performing the same filtering in the op doc definition as in the op definition generator.
Differential Revision: https://reviews.llvm.org/D99793
show more ...
|
#
caddfbd2 |
| 20-Mar-2021 |
River Riddle <riddleriver@gmail.com> |
[mlir][docs] Remove the BuiltinDialect documentation from langref and generate it from ODS
Now that all of the builtin dialect is generated from ODS, its documentation in LangRef can be split out an
[mlir][docs] Remove the BuiltinDialect documentation from langref and generate it from ODS
Now that all of the builtin dialect is generated from ODS, its documentation in LangRef can be split out and replaced with references to Dialects/Builtin.md. LangRef is quite crusty right now and should really have a full cleanup done in a followup.
Differential Revision: https://reviews.llvm.org/D98562
show more ...
|
#
a7cac0d9 |
| 05-Mar-2021 |
Mehdi Amini <joker.eph@gmail.com> |
Fix Dialect doc generation to special case for the Builtin dialect empty name
This should fix the issue with an empty entry for the builtin dialect on the website.
Differential Revision: https://re
Fix Dialect doc generation to special case for the Builtin dialect empty name
This should fix the issue with an empty entry for the builtin dialect on the website.
Differential Revision: https://reviews.llvm.org/D98074
show more ...
|
#
83ef862f |
| 04-Mar-2021 |
River Riddle <riddleriver@gmail.com> |
[mlir] Add support for generating Attribute classes for ODS
The support for attributes closely maps that of Types (basically 1-1) given that Attributes are defined in exactly the same way as Types.
[mlir] Add support for generating Attribute classes for ODS
The support for attributes closely maps that of Types (basically 1-1) given that Attributes are defined in exactly the same way as Types. All of the current ODS TypeDef classes get an Attr equivalent. The generation of the attribute classes themselves share the same generator as types.
Differential Revision: https://reviews.llvm.org/D97589
show more ...
|
#
69904112 |
| 23-Feb-2021 |
Marius Brehler <marius.brehler@iml.fraunhofer.de> |
[mlir] Fix emitting attribute documentation
This fixes the documentation emitted for type parameters. Also adds a missing empty line, rendered as line break in mark down.
Co-authored-by: Simon Camp
[mlir] Fix emitting attribute documentation
This fixes the documentation emitted for type parameters. Also adds a missing empty line, rendered as line break in mark down.
Co-authored-by: Simon Camphausen <simon.camphausen@iml.fraunhofer.de>
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D97267
show more ...
|
#
e0a93e4b |
| 06-Jan-2021 |
River Riddle <riddleriver@gmail.com> |
[mlir][ODS] Rename several uses of 'description' to 'summary'
Right now constraint/predicate traits/etc. use their "description" field as a one line human readable string. This breaks the current co
[mlir][ODS] Rename several uses of 'description' to 'summary'
Right now constraint/predicate traits/etc. use their "description" field as a one line human readable string. This breaks the current convention, by which a "description" may be multi-line. This revision renames the "description" field in these cases to "summary" which matches what the string is actually used as. This also unbreaks the use of TypeDefs(and eventually AttrDefs) in conjunction with existing type constraint facilities like `Optional`.
Differential Revision: https://reviews.llvm.org/D94133
show more ...
|
#
5fe53c41 |
| 13-Oct-2020 |
John Demme <john.demme@microsoft.com> |
[MLIR] Add support for defining Types in tblgen
Adds a TypeDef class to OpBase and backing generation code. Allows one to define the Type, its parameters, and printer/parser methods in ODS. Can gene
[MLIR] Add support for defining Types in tblgen
Adds a TypeDef class to OpBase and backing generation code. Allows one to define the Type, its parameters, and printer/parser methods in ODS. Can generate the Type C++ class, accessors, storage class, per-parameter custom allocators (for the storage constructor), and documentation.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D86904
show more ...
|
#
9b851527 |
| 03-Oct-2020 |
Jacques Pienaar <jpienaar@google.com> |
Add indented raw_ostream class
Class simplifies keeping track of the indentation while emitting. For every new line the current indentation is simply prefixed (if not at start of line, then it just
Add indented raw_ostream class
Class simplifies keeping track of the indentation while emitting. For every new line the current indentation is simply prefixed (if not at start of line, then it just emits as normal). Add a simple Region helper that makes it easy to have the C++ scope match the emitted scope.
Use this in op doc generator and rewrite generator.
This reverts revert commit be185b6a7355fdfeb1c31df2e1272366fe58b01f addresses shared lib failure by fixing up cmake files.
Differential Revision: https://reviews.llvm.org/D84107
show more ...
|
#
be185b6a |
| 03-Oct-2020 |
Jacques Pienaar <jpienaar@google.com> |
Revert "Add indented raw_ostream class"
This reverts commit 78530ce65375fa02bc96019e5cc9d73db8adaca4.
Fails on shared_lib build.
|
#
78530ce6 |
| 03-Oct-2020 |
Jacques Pienaar <jpienaar@google.com> |
Add indented raw_ostream class
Class simplifies keeping track of the indentation while emitting. For every new line the current indentation is simply prefixed (if not at start of line, then it just
Add indented raw_ostream class
Class simplifies keeping track of the indentation while emitting. For every new line the current indentation is simply prefixed (if not at start of line, then it just emits as normal). Add a simple Region helper that makes it easy to have the C++ scope match the emitted scope.
Use this in op doc generator and rewrite generator.
Differential Revision: https://reviews.llvm.org/D84107
show more ...
|
#
9db53a18 |
| 07-Jul-2020 |
River Riddle <riddleriver@gmail.com> |
[mlir][NFC] Remove usernames and google bug numbers from TODO comments.
These were largely leftover from when MLIR was a google project, and don't really follow LLVM guidelines.
|
#
1a083f02 |
| 24-Mar-2020 |
River Riddle <riddleriver@gmail.com> |
[mlir] Revamp operation documentation generation
Summary: This revisions performs several cleanups to the generated dialect documentation: * Standardizes format of attributes/operands/results sectio
[mlir] Revamp operation documentation generation
Summary: This revisions performs several cleanups to the generated dialect documentation: * Standardizes format of attributes/operands/results sections * Splits out operation/type/dialect documentation generation to allow for composing generated and hand-written documentation * Add section for declarative assembly syntax and successors * General cleanup
Differential Revision: https://reviews.llvm.org/D76573
show more ...
|
#
30857107 |
| 26-Jan-2020 |
Mehdi Amini <aminim@google.com> |
Mass update the MLIR license header to mention "Part of the LLVM project"
This is an artifact from merging MLIR into LLVM, the file headers are now aligned with the rest of the project.
|