[all-commits] [llvm/llvm-project] c38d9c: [mlir] Remove iterator_types() method from LinalgS...
Oleg Shyshkov via All-commits
all-commits at lists.llvm.org
Thu Oct 13 00:53:19 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c38d9cf20e7468a2618dc23fcdc66e79c925aff5
https://github.com/llvm/llvm-project/commit/c38d9cf20e7468a2618dc23fcdc66e79c925aff5
Author: Oleg Shyshkov <shyshkov at google.com>
Date: 2022-10-13 (Thu, 13 Oct 2022)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
M mlir/lib/Dialect/Linalg/Transforms/TilingInterfaceImpl.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
M mlir/test/lib/Dialect/Test/TestOps.td
M mlir/test/mlir-linalg-ods-gen/test-linalg-ods-yaml-gen.yaml
M mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
Log Message:
-----------
[mlir] Remove iterator_types() method from LinalgStructuredInterface.
`getIteratorTypesArray` should be used instead. It's a better substitute for all the current usages of the interface.
The current `ArrayAttr iterator_types()` has a few problems:
* It creates an assumption operation has iterators types as an attribute, but it's not always the case. Sometime iterator types can be inferred from other attribute, or they're just static.
* ArrayAttr is an obscure contained and required extracting values in the client code.
* Makes it hard to migrate iterator types from strings to enums ([RFC](https://discourse.llvm.org/t/rfc-enumattr-for-iterator-types-in-linalg/64535/9)).
Concrete ops, like `linalg.generic` will still have iterator types as an attribute if needed.
As a side effect, this change helps a bit with migration to prefixed accessors.
Differential Revision: https://reviews.llvm.org/D135765
More information about the All-commits
mailing list