[mlir][linalg] Perform checks early in hoist padding.
authorTobias Gysi <gysit@google.com>
Thu, 25 Nov 2021 10:37:00 +0000 (10:37 +0000)
committerTobias Gysi <gysit@google.com>
Thu, 25 Nov 2021 10:37:12 +0000 (10:37 +0000)
commit4b03906346a89b8c7e96b5ffe762183fb0fff7cd
tree34a29d5b1c8cbcef8323d58666a2e5fcd66b0e74
parentfd723eaa9254c2cdad2afade2e3bf0c4064675c6
[mlir][linalg] Perform checks early in hoist padding.

Instead of checking for unexpected operations (any operation with a region except for scf::For and `padTensorOp` or operations with a memory effect) while cloning the packing loop nest perform the checks early. Update `dropNonIndexDependencies` to check for unexpected operations. Additionally, check all of these operations have index type operands only.

Depends On D114428

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D114438
mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
mlir/test/Dialect/Linalg/pad-and-hoist.mlir