[PATCH] D54052: Support for inserting profile-directed cache prefetches

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 20 09:07:43 PST 2018


craig.topper added a comment.

Weird. I thought I wrote some comments last week, but they obviously didn’t make it in here. Guess I’ll redo that today when I get to the office. One thing I remember is that this patch uses ‘auto’ more than llvm prefers https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable



================
Comment at: lib/Target/X86/X86InsertPrefetch.cpp:175
+    for (auto MI = MBB.instr_begin(); MI != MBB.instr_end();) {
+      auto Current = MI;
+      ++MI;
----------------
LLVM style prefers to only use "auto" where the type is really obvious from the rest of the line. Like when its mentioned as part of a dyn_cast. The iterators in the for loop is probably fine, but the rest of this function should really use explicit types in place of auto.


Repository:
  rL LLVM

https://reviews.llvm.org/D54052





More information about the llvm-commits mailing list