[PATCH] D77727: Only insert memref_cast when needed during canonicalization.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 21:02:53 PDT 2020


mehdi_amini added inline comments.


================
Comment at: mlir/lib/Dialect/StandardOps/IR/Ops.cpp:322
+  auto uses = oldOp->getUses();
+  for (auto it = uses.begin(); it != uses.end(); it++) {
+    auto *user = it.getUser();
----------------
bondhugula wrote:
> More compact to use: 
> 
> `for (auto *userOp : oldOp->getUsers())`
`Operation *` instead of `auto` please. In general please avoid auto where is does not improve readability / when the type isn't obvious from the context.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77727





More information about the llvm-commits mailing list