aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ModuloSchedule.cpp
diff options
context:
space:
mode:
authorNicolas Vasilache <ntv@google.com>2020-05-29 08:01:15 -0400
committerNicolas Vasilache <ntv@google.com>2020-05-29 08:08:34 -0400
commit1ee114322cb251f851028c72e7974bf85e707e55 (patch)
tree24d70791c73d1e7743846fbf390809c87cd0cda3 /llvm/lib/CodeGen/ModuloSchedule.cpp
parentea7db621d289022f0733eb63bb10a837936cbb38 (diff)
downloadllvm-1ee114322cb251f851028c72e7974bf85e707e55.zip
llvm-1ee114322cb251f851028c72e7974bf85e707e55.tar.gz
llvm-1ee114322cb251f851028c72e7974bf85e707e55.tar.bz2
[mlir][Linalg][Vector] Add forwarding patterns between linalg.copy and vector.transfer
This revision adds custom rewrites for patterns that arise during linalg structured ops vectorization. These patterns allow the composition of linalg promotion, vectorization and removal of redundant copies. The patterns are voluntarily limited and restrictive atm. More robust behavior will be implemented once more powerful side effect modeling and analyses are available on view/subview. On the transfer_read side, the following pattern is rewritten: ``` %alloc = ... [optional] %view = std.view %alloc ... %subView = subview %allocOrView ... [optional] linalg.fill(%allocOrView, %cst) ... ... linalg.copy(%in, %subView) ... vector.transfer_read %allocOrView[...], %cst ... ``` into ``` [unchanged] %alloc = ... [unchanged] [optional] %view = std.view %alloc ... [unchanged] [unchanged] %subView = subview %allocOrView ... ... vector.transfer_read %in[...], %cst ... ``` On the transfer_write side, the following pattern is rewriten: ``` %alloc = ... [optional] %view = std.view %alloc ... %subView = subview %allocOrView... ... vector.transfer_write %..., %allocOrView[...] linalg.copy(%subView, %out) ``` Differential Revision: https://reviews.llvm.org/D80728
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions