[PATCH] D77088: [mlir] [VectorOps] Implement a simple folder for identity vector.transpose operations.

Alex Grosul via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 19:41:18 PDT 2020


grosul1 added inline comments.


================
Comment at: mlir/lib/Dialect/Vector/VectorOps.cpp:1536
+  // {0, 1, 2, ...}.
+  for (int64_t i = 0, e = transp.size(); i < e; i++) {
+    if (transp[i] != i)
----------------
aartbik wrote:
> Given the llvm style of leaving the {} out of trivial for/ifs (something I am not a big fan of), I am wondering if that actually also applies to this case, trivial for loop with trivial if, so no {} on for either; perhaps others will comment, otherwise just leave it
I can turn this loop (back) into a lambda.
Not quite the same case, but similar: https://llvm.org/docs/CodingStandards.html#turn-predicate-loops-into-predicate-functions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77088





More information about the llvm-commits mailing list