[all-commits] [llvm/llvm-project] 6b6c96: [mlir][ODS] Add a new trait `TypesMatchWith`

River Riddle via All-commits all-commits at lists.llvm.org
Wed Feb 19 10:22:39 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b6c96695c0054ebad6816171ef89d5cb76a058b
      https://github.com/llvm/llvm-project/commit/6b6c96695c0054ebad6816171ef89d5cb76a058b
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-02-19 (Wed, 19 Feb 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/Support/STLExtras.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/IR/invalid-ops.mlir
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [mlir][ODS] Add a new trait `TypesMatchWith`

Summary:
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.

Differential Revision: https://reviews.llvm.org/D74647




More information about the All-commits mailing list