[PATCH] D81050: [llvm-exegesis] Let Counter returns up to 16 entries.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 19 05:53:31 PDT 2020


courbet added inline comments.


================
Comment at: llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp:62
+      Result->resize(NumValues, 0);
+    for (size_t I = 0, End = NewValues.size(); I < End; ++I) {
+      (*Result)[I] += NewValues[I];
----------------
[style] no braces


================
Comment at: llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp:53
+      Min = V;
+  return Min;
+}
----------------
ondrasej wrote:
> A shorter way to write this:
> ```
> return std::accumulate(
>   Values.begin(), Values.end(), std::numeric_limits<int64_t>::max(),
>   [](int64_t A, int64_t B) { return A < B ? A : B; });
> ```
> And similar for FindMax below.
Why not `std::min_element` ?


================
Comment at: llvm/tools/llvm-exegesis/lib/Target.cpp:74
+    InstructionBenchmark::ResultAggregationModeE ResultAggMode) const {
+  // FIXME propagate ResultAggMode to other BenchmarkRunner.
   PfmCountersInfo PfmCounters = State.getPfmCounters();
----------------
Let's do this now to avoid being in an inconsistent state.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81050





More information about the llvm-commits mailing list