[PATCH] D72965: Support vector transfer_read/write unrolling for memrefs with vector element type.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 26 02:22:23 PST 2020


rriddle added inline comments.


================
Comment at: mlir/lib/Dialect/VectorOps/VectorTransforms.cpp:488
 
 // Generates slices of 'vectorType' according to 'sizes' and 'strides, and
 // calls 'fn' with linear index and indices for each slice.
----------------
While you are here can you change this to ///?


================
Comment at: mlir/lib/Dialect/VectorOps/VectorTransforms.cpp:517
+  unsigned vectorRank = vectorType.getRank();
+  if (auto memrefVectorElementType = memrefElementType.dyn_cast<VectorType>()) {
+    vectorRank -= memrefVectorElementType.getRank();
----------------
Remove trivial braces.


================
Comment at: mlir/lib/Dialect/VectorOps/VectorTransforms.cpp:548
 
+// Returns true if 'map' is a suffix of an identity affine map, false otherwise.
+// Example: affine_map<(d0, d1, d2, d3) -> (d2, d3)>
----------------
Use ///


================
Comment at: mlir/lib/Dialect/VectorOps/VectorTransforms.cpp:554
+  ArrayRef<AffineExpr> results = map.getResults();
+  int lastPos = -1;
+  for (unsigned i = 0, e = map.getNumResults(); i < e; ++i) {
----------------
nit: Why not use Optional<int> instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72965





More information about the llvm-commits mailing list