[PATCH] D73122: [mlir] Enable specifying verify on OpInterface

Jacques Pienaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 10:10:08 PST 2020


jpienaar created this revision.
jpienaar added a reviewer: rriddle.
Herald added subscribers: llvm-commits, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, burmako, mehdi_amini.
Herald added a reviewer: nicolasvasilache.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73122

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73122.239365.patch
Type: text/x-patch
Size: 8376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200121/0bc1896d/attachment.bin>


More information about the llvm-commits mailing list