diff options
author | Quentin Colombet <quentin.colombet@gmail.com> | 2023-06-05 14:33:52 +0200 |
---|---|---|
committer | Quentin Colombet <quentin.colombet@gmail.com> | 2023-06-05 15:52:26 +0200 |
commit | 018d8ac974ff8ae6ef9bcda9990111ec84897107 (patch) | |
tree | 2843a8e134d969ad833de6f87c997844be400a3c /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | 27aea17fe061f9778bb1e8ff5fdf9fc0fb03abe1 (diff) | |
download | llvm-018d8ac974ff8ae6ef9bcda9990111ec84897107.zip llvm-018d8ac974ff8ae6ef9bcda9990111ec84897107.tar.gz llvm-018d8ac974ff8ae6ef9bcda9990111ec84897107.tar.bz2 |
[mlir][Vector] Fix a propagation bug with transfer_read
In the vector distribute patterns, we used to move
`vector.transfer_read`s out of `vector.warp_execute_on_lane0`s
irrespectively of how they were defined.
This could create transfer_read operations that would read values from
within the warpOp's body from outside of the body.
E.g.,
```
warpop {
%defined_in_body
%read = transfer_read %defined_in_body
vector.yield %read
}
```
=>
```
warpop {
%defined_in_body
vector.yield ...
}
// %defined_in_body is referenced outside of its scope.
%read = transfer_read %defined_in_body
```
The fix consists in checking that all the values feeding the new
`transfer_read` are defined outside of warpOp's body.
Note: We could do this check before creating any operation, but that would
mean knowing what `affine::makeComposedAffineApply` actually do. So the
current fix is a trade off of coupling the implementations of this
propagation and `makeComposedAffineApply` versus compile time.
Differential Revision: https://reviews.llvm.org/D152149
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions