aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopVersioning.cpp
diff options
context:
space:
mode:
authorNicolas Vasilache <ntv@google.com>2020-08-03 12:24:53 -0400
committerNicolas Vasilache <ntv@google.com>2020-08-03 12:58:18 -0400
commitd313e9c12ed3541f63a36e3b0d59e9e1185603d2 (patch)
treeeb40d6c2cf524be6b0b393cb8d381b738d3fa90e /llvm/lib/Transforms/Utils/LoopVersioning.cpp
parent4b1b109c5126efc963cc19949df5201e40f1bcc1 (diff)
downloadllvm-d313e9c12ed3541f63a36e3b0d59e9e1185603d2.zip
llvm-d313e9c12ed3541f63a36e3b0d59e9e1185603d2.tar.gz
llvm-d313e9c12ed3541f63a36e3b0d59e9e1185603d2.tar.bz2
[mlir][Vector] Add transformation + pattern to split vector.transfer_read into full and partial copies.
This revision adds a transformation and a pattern that rewrites a "maybe masked" `vector.transfer_read %view[...], %pad `into a pattern resembling: ``` %1:3 = scf.if (%inBounds) { scf.yield %view : memref<A...>, index, index } else { %2 = vector.transfer_read %view[...], %pad : memref<A...>, vector<...> %3 = vector.type_cast %extra_alloc : memref<...> to memref<vector<...>> store %2, %3[] : memref<vector<...>> %4 = memref_cast %extra_alloc: memref<B...> to memref<A...> scf.yield %4 : memref<A...>, index, index } %res= vector.transfer_read %1#0[%1#1, %1#2] {masked = [false ... false]} ``` where `extra_alloc` is a top of the function alloca'ed buffer of one vector. This rewrite makes it possible to realize the "always full tile" abstraction where vector.transfer_read operations are guaranteed to read from a padded full buffer. The extra work only occurs on the boundary tiles. Differential Revision: https://reviews.llvm.org/D84631
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
0 files changed, 0 insertions, 0 deletions