[Mlir-commits] [mlir] [llvm] [mlir][Interfaces] Add `SubsetOpInterface` and `SubsetExtractionOpInterface` (PR #70617)
Matthias Springer
llvmlistbot at llvm.org
Tue Oct 31 18:08:53 PDT 2023
================
@@ -9,12 +9,29 @@
#include "mlir/Dialect/Linalg/Transforms/SubsetInsertionOpInterfaceImpl.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
-#include "mlir/Interfaces/SubsetInsertionOpInterface.h"
+#include "mlir/Interfaces/SubsetOpInterface.h"
using namespace mlir;
using namespace mlir::linalg;
namespace {
+struct LinalgCopyOpSubsetOpInterface
+ : public SubsetOpInterface::ExternalModel<LinalgCopyOpSubsetOpInterface,
+ linalg::CopyOp> {
+ bool operatesOnEquivalentSubset(
----------------
matthias-springer wrote:
`false` is a conservative implementation. I added a better implementation for `operatesOnEquivalentSubset`. `linalg.copy` implements this interface only for bufferization purposes. It does not participate in subset hoisting, so `operatesOnEquivalentSubset` and `operatesOnDisjointSubset` are actually not needed at the moment.
https://github.com/llvm/llvm-project/pull/70617
More information about the Mlir-commits
mailing list