[mlir] Extract DestinationStyleOpInterface from LinalgStructuredInterface.
authorAdrian Kuegel <akuegel@google.com>
Tue, 23 Aug 2022 10:34:58 +0000 (12:34 +0200)
committerAdrian Kuegel <akuegel@google.com>
Tue, 23 Aug 2022 11:27:30 +0000 (13:27 +0200)
commitd9cbefc4c738dc976b6b20fb1eb82a55d78dd801
treef28b11f6702b922f5affb3dd920f06301e08ab6a
parent0df7e1b0e5ccb499dce024d9eed2d24b0f0c2d4b
[mlir] Extract DestinationStyleOpInterface from LinalgStructuredInterface.

There are several use cases where a destination style operation needs an interface
that contains a subset of the methods from LinalgStructuredInterface.
In this change, we move all such methods to a new interface, and add forwarding
methods to LinalgStructuredInterface to make the change the less invasive.
It may be possible to refactor the code later to get rid of (some or all) of the
forwarding methods.
This change also removes the cloneWithMapper interface methods, as it is not used anywhere.

RFC:
https://discourse.llvm.org/t/rfc-interface-for-destination-style-ops/64056

Differential Revision: https://reviews.llvm.org/D132125
mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h
mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
mlir/test/lib/Dialect/Test/TestOps.td