[mlir][vector] Fix distribution of scf.for with value coming from above
authorThomas Raoux <thomasraoux@google.com>
Tue, 1 Nov 2022 06:25:47 +0000 (06:25 +0000)
committerThomas Raoux <thomasraoux@google.com>
Wed, 2 Nov 2022 04:15:18 +0000 (04:15 +0000)
commit91f62f0e352a4f5c755f1cbec6f27e40a60ff109
tree17beeb0d9b89eb26397f0b2c12e9d66554679b0c
parent7fdf3564c04075d3e6be2d9540e5a6f1e084be9f
[mlir][vector] Fix distribution of scf.for with value coming from above

When a value used in the forOp is defined outside the region but within
the parent warpOp we need to return and distribute the value to pass it
to new operations created within the loop.
Also simplify the lambda interface.

Differential Revision: https://reviews.llvm.org/D137146
mlir/include/mlir/Dialect/Vector/Transforms/VectorDistribution.h
mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
mlir/test/Dialect/Vector/vector-warp-distribute.mlir
mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp