[mlir] verify that transform ops have memory effects
authorAlex Zinenko <zinenko@google.com>
Tue, 10 Jan 2023 12:19:53 +0000 (12:19 +0000)
committerAlex Zinenko <zinenko@google.com>
Tue, 10 Jan 2023 13:49:40 +0000 (13:49 +0000)
commit394892841aeaf35a75fa626b07637da68be176a9
tree6824ac7e309ec3a05d2b76a1bca88967e95145b9
parent506ef97dc87ee8da686cf92d03ab1e9567bb26d3
[mlir] verify that transform ops have memory effects

Add a verifier to the TransformOpInterface ensuring that operations
implementing the interface define memory effects on their operands and
results.

Add the missing effects to TileToForeachThreadOp, specifically for
operands that were added at a later version of the op without modifying
`getEffects` accordingly.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D141371
mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.td
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
mlir/test/Dialect/Transform/ops-invalid.mlir
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td