[PATCH] D80728: [mlir][Linalg][Vector] Add forwarding patterns between linalg.copy and vector.transfer

Aart Bik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 28 21:55:33 PDT 2020


aartbik added inline comments.


================
Comment at: mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h:459
+/// ```
+/// Where there is no interleaved use between linalg.copy transfer_read and no
+/// interleaved use between linalg.fill and linalg.copy (if specified).
----------------
and missing


================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp:133
+
+static bool mayExistInterleavedUses(Operation *firstOp, Operation *secondOp,
+                                    ValueRange values) {
----------------
perhaps give it a comment:

Test for interleaved uses, conservatively erring on their existence

or something to show the conservative assumption (the may part)


================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp:193
+
+  // Find the copy into `subView` without interleaved.
+  CopyOp copyOp;
----------------
without interleaved .... ?


================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp:229
+
+  // `in` is the subview copied from that we replace.
+  Value in = copyOp.getInput(0);
----------------
comment reads a bit awkward...



================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp:261
+        return failure();
+      else
+        subViewOp = newSubViewOp;
----------------
as requested above by riddle


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80728/new/

https://reviews.llvm.org/D80728





More information about the llvm-commits mailing list