[PATCH] D50031: Add pass to print out DebugCounter info

Zhizhou Yang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 14:16:06 PDT 2018


zhizhouy added a comment.

Thanks for reviewing.



================
Comment at: lib/Support/DebugCounter.cpp:118
+                                          RegisteredCounters.end());
+  sort(CounterNames.begin(), CounterNames.end());
+
----------------
davide wrote:
> why do you need to sort the counters here?
The reason we sort it here is the order of entries in RegisteredCounters is not stable since it is a map. We want to make sure the each time of the output should be same. So I put it in to a vector with the order of names.


Repository:
  rL LLVM

https://reviews.llvm.org/D50031





More information about the llvm-commits mailing list