[all-commits] [llvm/llvm-project] 178562: [mlir] Enable specifying verify on OpInterface

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Wed Jan 22 04:43:45 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 178562fb352d12b5235c63f75297b8a456b53a0f
      https://github.com/llvm/llvm-project/commit/178562fb352d12b5235c63f75297b8a456b53a0f
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2020-01-22 (Wed, 22 Jan 2020)

  Changed paths:
    M mlir/docs/OpDefinitions.md
    M mlir/include/mlir/Analysis/InferTypeOpInterface.h
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/TableGen/OpInterfaces.h
    M mlir/lib/Analysis/InferTypeOpInterface.cpp
    M mlir/lib/TableGen/OpInterfaces.cpp
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/mlir-tblgen/return-types.mlir
    M mlir/tools/mlir-tblgen/OpInterfacesGen.cpp

  Log Message:
  -----------
  [mlir] Enable specifying verify on OpInterface

Summary:
Add method in ODS to specify verification for operations implementing a
OpInterface. Use this with infer type op interface to verify that the
inferred type matches the return type and remove special case in
TestPatterns.

This could also have been achieved by using OpInterfaceMethod but verify
seems pretty common and it is not an arbitrary method that just happened
to be named verifyTrait, so having it be defined in special way seems
appropriate/better documenting.

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




More information about the All-commits mailing list