[all-commits] [llvm/llvm-project] eaa527: [mlir][linalg] Verify every LinalgOp has a body.
Tobias Gysi via All-commits
all-commits at lists.llvm.org
Thu Oct 14 02:37:07 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eaa52750ce38e5c5d7c6b681476f50da9d75bc54
https://github.com/llvm/llvm-project/commit/eaa52750ce38e5c5d7c6b681476f50da9d75bc54
Author: Tobias Gysi <gysit at google.com>
Date: 2021-10-14 (Thu, 14 Oct 2021)
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/LinalgInterfaces.cpp
M mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
M mlir/lib/Dialect/Linalg/Transforms/Generalization.cpp
M mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp
M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
M mlir/test/Dialect/Linalg/invalid.mlir
M mlir/test/lib/Dialect/Test/TestOps.td
M mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
Log Message:
-----------
[mlir][linalg] Verify every LinalgOp has a body.
After removing the last LinalgOps that have no region attached we can verify there is a region. The patch performs the following changes:
- Move the SingleBlockImplicitTerminator trait further up the the structured op base class.
- Adapt the LinalgOp verification since the trait only check if there is 0 or 1 block.
- Introduce a getBlock method on the LinalgOp interface.
- Access the LinalgOp body using either getBlock() or getBody() if the concrete operation type is known.
This patch is a follow up to https://reviews.llvm.org/D111233.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D111393
More information about the All-commits
mailing list