[PATCH] D51276: [New PM][PassTiming] implement -time-passes for the new pass manager

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 26 01:57:11 PDT 2018


philip.pfaffe added inline comments.


================
Comment at: include/llvm/IR/PassTimingInfo.h:50
+  /// to all the instance of a given pass) + sequential invocation counter.
+  using UniqPassID = std::pair<StringRef, unsigned>;
+
----------------
This needn't even be public.


================
Comment at: include/llvm/IR/PassTimingInfo.h:52
+
+private:
+  /// A group of all pass-timing timers.
----------------
Try to minimize the number of visibility edges. I.e. reorder the members, public first, private second.


================
Comment at: include/llvm/IR/PassTimingInfo.h:71
+  ~PassTiming() {
+    // It first destroys the TimingData map, which deploys all the collected
+    // timers data into the TG time group member.
----------------
Instead of this empty thing that's just a comment, actively clear() the TimingData here. Then it's explicit what is supposed to happen here, and you don't rely on destruction order of the class members.


Repository:
  rL LLVM

https://reviews.llvm.org/D51276





More information about the llvm-commits mailing list