[PATCH] D146694: [NFC] Fix auto usage to avoid copies

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 02:18:40 PDT 2023


LuoYuanke added inline comments.


================
Comment at: llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp:857
     // Insert new location defs.
-    for (auto& Pair : BBInsertBeforeMap) {
+    for (auto &Pair : BBInsertBeforeMap) {
       InsertMap &Map = Pair.second;
----------------
@craig.topper, how about this one? Does the iteration return reference? For basic practice "auto &" is better than "auto"?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146694



More information about the llvm-commits mailing list