summaryrefslogtreecommitdiffstats
path: root/mlir/lib/TableGen/Format.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adjust License.txt file to use the LLVM licenseMehdi Amini2019-12-231-13/+4
| | | | PiperOrigin-RevId: 286906740
* NFC: Add a missing include for std::isalnum and std::digit.River Riddle2019-06-011-0/+1
| | | | | | -- PiperOrigin-RevId: 250085298
* [TableGen] Better support for predicate and rewrite rule specificationLei Zhang2019-04-181-0/+184
Currently predicates are written with positional placeholders `{N}` and rely on `formatv` as the engine to do substitution. The problem with this approach is that the definitions of those positional placeholders are not consistent; they are entirely up to the defining predicate of question. For example, `{0}` in various attribute constraints is used to mean the attribute, while it is used to main the builder for certain attribute transformations. This can become very confusing. This CL introduces `tgfmt` as a new mechanism to better support for predicate and rewrite rule specification. Instead of entirely relying on positional placeholders, `tgfmt` support both positional and special placeholders. The former is used for DAG operands. The latter, including $_builder, $_op, $_self, are used as special "hooks" to entities in the context. With this, the predicate and rewrite rules specification can be more consistent is more readable. -- PiperOrigin-RevId: 243249671
OpenPOWER on IntegriCloud