[all-commits] [llvm/llvm-project] f3cc85: [mlir][Vector] Add folding of vector transfers fro...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Mar 4 06:22:09 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3cc8543647cfcfd3ea383e6738bc58a258d6f74
      https://github.com/llvm/llvm-project/commit/f3cc8543647cfcfd3ea383e6738bc58a258d6f74
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M mlir/lib/Dialect/Vector/VectorOps.cpp
    M mlir/test/Dialect/Vector/canonicalize.mlir

  Log Message:
  -----------
  [mlir][Vector] Add folding of vector transfers from/into tensor producing ops.

Add a folder to rewrite a sequence such as:

```
   %t1 = ...
   %v = vector.transfer_read %t0[%c0...], {masked = [false...]} :
     tensor<static_sizesxf32>, vector<static_sizesxf32>
  %t2 = vector.transfer_write %v, %t1[%c0...] {masked = [false...]} :
     vector<static_sizesxf32>, tensor<static_sizesxf32>
```

into:

```
   %t0
```

The producer of t1 may or may not be DCE'd depending on whether it is a
block argument or has side effects.

Differential revision: https://reviews.llvm.org/D97934




More information about the All-commits mailing list