This allows for injecting type constraints that are not direct 1-1 mappings, for example when one type is equal to the element type of another. This allows for moving over several more parsers to the declarative form.
Depends On D74647
| Paths 
 |  Differential  D74648  
[mlir][DeclarativeParser] Add support for the TypesMatchWith trait. ClosedPublic Authored by rriddle on Feb 14 2020, 1:48 PM. 
Details Summary This allows for injecting type constraints that are not direct 1-1 mappings, for example when one type is equal to the element type of another. This allows for moving over several more parsers to the declarative form. Depends On D74647 
Diff Detail 
 Event TimelineComment Actions Nice! Can we also update the doc regarding which traits are supported? Otherwise it's quite obscure for somebody to figure out what works and what not. 
 This revision is now accepted and ready to land.Feb 21 2020, 12:01 PM Comment Actions 
 Yep completely agree, will add all of the currently supported traits in a followup. Closed by commit rG26222db01b07: [mlir][DeclarativeParser] Add support for the TypesMatchWith trait. (authored by rriddle).  ·  Explain WhyFeb 21 2020, 3:25 PM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
 
Diff 244762 mlir/include/mlir/Dialect/StandardOps/Ops.td
 mlir/include/mlir/Dialect/VectorOps/VectorOps.td
 mlir/lib/Dialect/StandardOps/Ops.cpp
 mlir/lib/Dialect/VectorOps/VectorOps.cpp
 mlir/test/IR/invalid-ops.mlir
 mlir/tools/mlir-tblgen/OpFormatGen.cpp
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This pair is not trivial and it appears at lots of places. Might be worth it to define a struct to improve readability? Meta-programming is always difficult to understand; string concatenation to generate code too. :)