summaryrefslogtreecommitdiffstats
path: root/mlir/tools/mlir-tblgen/ReferenceImplGen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adjust License.txt file to use the LLVM licenseMehdi Amini2019-12-231-13/+4
| | | | PiperOrigin-RevId: 286906740
* Fix typos, NFC.Christian Sigg2019-10-041-1/+1
| | | | PiperOrigin-RevId: 272851237
* NFC: Rename Function to FuncOp.River Riddle2019-07-101-1/+1
| | | | PiperOrigin-RevId: 257293379
* Port Tablegen'd reference implementation of Add to declarative builders.Nicolas Vasilache2019-03-291-20/+23
| | | | PiperOrigin-RevId: 238977252
* Cleanup EDSCs and start a functional auto-generated library of custom OpsNicolas Vasilache2019-03-291-31/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL applies the following simplifications to EDSCs: 1. Rename Block to StmtList because an MLIR Block is a different, not yet supported, notion; 2. Rework Bindable to drop specific storage and just use it as a simple wrapper around Expr. The only value of Bindable is to force a static cast when used by the user to bind into the emitter. For all intended purposes, Bindable is just a lightweight check that an Expr is Unbound. This simplifies usage and reduces the API footprint. After playing with it for some time, it wasn't worth the API cognition overhead; 3. Replace makeExprs and makeBindables by makeNewExprs and copyExprs which is more explicit and less easy to misuse; 4. Add generally useful functionality to MLIREmitter: a. expose zero and one for the ubiquitous common lower bounds and step; b. add support to create already bound Exprs for all function arguments as well as shapes and views for Exprs bound to memrefs. 5. Delete Stmt::operator= and replace by a `Stmt::set` method which is more explicit. 6. Make Stmt::operator Expr() explicit. 7. Indexed.indices assertions are removed to pave the way for expressing slices and views as well as to work with 0-D memrefs. The CL plugs those simplifications with TableGen and allows emitting a full MLIR function for pointwise add. This "x.add" op is both type and rank-agnostic (by allowing ArrayRef of Expr passed to For loops) and opens the door to spinning up a composable library of existing and custom ops that should automate a lot of the tedious work in TF/XLA -> MLIR. Testing needs to be significantly improved but can be done in a separate CL. PiperOrigin-RevId: 231982325
* [tablegen] Use tblgen:: classes for NamedAttribute and Operand fieldsLei Zhang2019-03-291-7/+5
| | | | | | This is another step towards hiding raw TableGen API calls. PiperOrigin-RevId: 231580827
* Start doc generation pass.Jacques Pienaar2019-03-291-7/+7
| | | | | | | | | | 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
* Generate some of the boilerplate for reference implementation specificationJacques Pienaar2019-03-291-5/+34
| | | | PiperOrigin-RevId: 229735735
* Enable specifying the op for which the reference implementation should be ↵Jacques Pienaar2019-03-291-10/+12
| | | | | | | | printed. Allows emitting reference implementation of multiple ops inside the test lowering pass. PiperOrigin-RevId: 229603494
* Start a testing pass for EDSC lowering.Jacques Pienaar2019-03-291-0/+69
This is mostly plumbing to start allowing testing EDSC lowering. Prototype specifying reference implementation using verbose format without any generation/binding support. Add test pass that dumps the constructed EDSC (of which there can only be one). The idea is to enable iterating from multiple sides, this is wrong on many dimensions at the moment. PiperOrigin-RevId: 229570535
OpenPOWER on IntegriCloud