[PATCH] D52539: [llvm-exegesis] Add support for measuring NumMicroOps.

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 26 03:40:33 PDT 2018


gchatelet added inline comments.


================
Comment at: tools/llvm-exegesis/lib/Uops.cpp:289
+    const double CounterValue = RunMeasurement(PfmCounters);
+    Result.push_back({llvm::itostr(ProcResIdx), CounterValue, CounterValue,
                       SchedModel.getProcResource(ProcResIdx)->Name});
----------------
I'm not too fond of the initializer list here because it's not future proof (and not readable)
Maybe create a value on the stack, initializes the members and `push_back(std::move())`?

Same below.


================
Comment at: tools/llvm-exegesis/lib/Uops.cpp:294
+  if (const char *const PfmUopsCounter =
+          SchedModel.getExtraProcessorInfo().PfmCounters.UopsCounter) {
+    const double CounterValue = RunMeasurement(PfmUopsCounter);
----------------
Might be worth creating a variable for `SchedModel.getExtraProcessorInfo().PfmCounters`


Repository:
  rL LLVM

https://reviews.llvm.org/D52539





More information about the llvm-commits mailing list