summaryrefslogtreecommitdiffstats
path: root/mlir/tools/mlir-tblgen/OpDocGen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adjust License.txt file to use the LLVM licenseMehdi Amini2019-12-231-13/+4
| | | | PiperOrigin-RevId: 286906740
* Emit empty lines after headers when generating op docsLei Zhang2019-11-051-7/+7
| | | | | | | | | This makes the generated doc easier to read and it is also more friendly to certain markdown parsers like kramdown. Fixes tensorflow/mlir#221 PiperOrigin-RevId: 278643469
* Add "[TOC]" to generated documentationMLIR Team2019-10-291-0/+3
| | | | PiperOrigin-RevId: 277354482
* Add DialectType and generate docs for dialect typesJacques Pienaar2019-10-071-8/+25
| | | | | | Add new `typeDescription` (description was already used by base constraint class) field to type to allow writing longer descriptions about a type being defined. This allows for providing additional information/rationale for a defined type. This currently uses `description` as the heading/name for the type in the generated documentation. PiperOrigin-RevId: 273299332
* Enable emitting dialect summary & description during op generationJacques Pienaar2019-10-051-14/+39
| | | | | | Sort ops per dialect and emit summary & description (if provided) of each dialect before emitting the ops of the dialect. PiperOrigin-RevId: 273077138
* Allow attaching descriptions to OpInterfaces and InterfaceMethods.River Riddle2019-09-241-2/+3
| | | | | | | | | | | | | | | | | | | This change adds support for documenting interfaces and their methods. A tablegen generator for the interface documentation is also added(gen-op-interface-doc). Documentation is added to an OpInterface via the `description` field: def MyOpInterface : OpInterface<"MyOpInterface"> { let description = [{ My interface is very interesting. }]; } Documentation is added to an InterfaceMethod via a new `description` field that comes right before the optional body: InterfaceMethod<"void", "foo", (ins), [{ This is the foo method. }]>, PiperOrigin-RevId: 270965485
* NFC: Simplify named attribute in TableGen generatorsSmit Hinsu2019-04-181-1/+1
| | | | | | | | | | | Now, op attribute names don't have '.' in their names so the special handling for it can be removed. Attributes for functions still have dialect prefix with '.' as separator but TableGen does not deal with functions. TESTED with existing unit tests -- PiperOrigin-RevId: 243287462
* Change Value to NamedTypeConstraint and use TypeConstraint.Jacques Pienaar2019-03-291-2/+2
| | | | | | Previously Value was a pair of name & Type, but for operands/result a TypeConstraint rather then a Type is specified. Update C++ side to match declarative side. PiperOrigin-RevId: 238984799
* [tablegen] Use tblgen:: classes for NamedAttribute and Operand fieldsLei Zhang2019-03-291-5/+4
| | | | | | This is another step towards hiding raw TableGen API calls. PiperOrigin-RevId: 231580827
* [doc] Use table to list all attributesLei Zhang2019-03-291-2/+7
| | | | | | For each attribute, list its MLIR type and description. PiperOrigin-RevId: 231580353
* [doc] Generate more readable description for attributesLei Zhang2019-03-291-6/+2
| | | | | | | This CL added "description" field to AttrConstraint and Attr, like what we have for type classes. PiperOrigin-RevId: 231579853
* [doc] Generate more readable description for operandsLei Zhang2019-03-291-4/+3
| | | | | | | | This CL mandated TypeConstraint and Type to provide descriptions and fixed various subclasses and definitions to provide so. The purpose is to enforce good documentation; using empty string as the default just invites oversight. PiperOrigin-RevId: 231579629
* Include op results in generate TensorFlow/TFLite op docsLei Zhang2019-03-291-10/+25
| | | | | | | | | | | * Emitted result lists for ops. * Changed to allow empty summary and description for ops. * Avoided indenting description to allow proper MarkDown rendering of formatting markers inside description content. * Used fixed width font for operand/attribute names. * Massaged TensorFlow op docs and generated dialect op doc. PiperOrigin-RevId: 231427574
* Prefix Operator getter methods with "get" to be consistentLei Zhang2019-03-291-1/+1
| | | | PiperOrigin-RevId: 231416230
* Fixing op description white space during doc emission.Jacques Pienaar2019-03-291-2/+42
| | | | | | Strip additional whitespacing before and only add required additional indentation back. PiperOrigin-RevId: 230426127
* Start doc generation pass.Jacques Pienaar2019-03-291-0/+92
Start doc generation pass that generates simple markdown output. The output is formatted simply[1] in markdown, but this allows seeing what info we have, where we can refine the op description (e.g., the inputs is probably redundant), what info is missing (e.g., the attributes could probably have a description). The formatting of the description is still left up to whatever was in the op definition (which luckily, due to the uniformity in the .td file, turned out well but relying on the indentation there is fragile). The mechanism to autogenerate these post changes has not been added yet either. The output file could be run through a markdown formatter too to remove extra spaces. [1]. This is not proposal for final style :) There could also be a discussion around single doc vs multiple (per dialect, per op), whether we want a TOC, whether operands/attributes should be headings or just formatted differently ... PiperOrigin-RevId: 230354538
OpenPOWER on IntegriCloud