[PATCH] D74647: [mlir][ODS] Add a new trait `TypesMatchWith`
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 14 13:52:45 PST 2020
rriddle created this revision.
rriddle added reviewers: jpienaar, antiagainst.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, shauheen, burmako, mehdi_amini.
Herald added a reviewer: nicolasvasilache.
Herald added a project: LLVM.
rriddle added a child revision: D74648: [mlir][DeclarativeParser] Add support for the TypesMatchWith trait..
rriddle added a comment.
@antiagainst @jpienaar I'm not attached to the name here, I just couldn't think of one so please suggest something better if you can.
This trait takes three arguments: lhs, rhs, transformer. It verifies that the type of 'rhs' matches the type of 'lhs' when the given 'transformer' is applied to 'lhs'. This allows for adding constraints like: "the type of 'a' must match the element type of 'b'". A followup revision will add support in the declarative parser for using these equality constraints to port more c++ parsers to the declarative form.
Depends On D74646 <https://reviews.llvm.org/D74646>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74647
Files:
mlir/include/mlir/Dialect/StandardOps/Ops.td
mlir/include/mlir/Dialect/VectorOps/VectorOps.td
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/IR/OperationSupport.h
mlir/lib/Dialect/StandardOps/Ops.cpp
mlir/test/Dialect/VectorOps/invalid.mlir
mlir/test/IR/invalid-ops.mlir
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74647.244761.patch
Type: text/x-patch
Size: 26469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200214/a7303955/attachment.bin>
More information about the llvm-commits
mailing list