[mlir] Enable specifying verify on OpInterface

Authored by jpienaar on Tue, Jan 21, 9:40 AM.


[mlir] Enable specifying verify on OpInterface

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

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