[PATCH] D57658: [llvm-exegesis] Cut run time of analysis mode by another -35% (*sic*) (YamlContext::getRegNo())

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 4 00:26:54 PST 2019


courbet accepted this revision.
courbet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: tools/llvm-exegesis/lib/BenchmarkResult.cpp:50
+    for (unsigned I = 0, E = RegInfo.getNumRegs(); I < E; ++I)
+      Map.insert(std::make_pair(RegInfo.getName(I), I));
+    assert(Map.size() == RegInfo.getNumRegs() && "Size prediction failed");
----------------
[nit] Given that you're not using the return value, consider using the shorter `Map[RegInfo.getName(I)] = I`


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57658





More information about the llvm-commits mailing list