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

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 02:33:32 PDT 2018


fedor.sergeev added inline comments.


================
Comment at: include/llvm/IR/PassTimingInfo.h:120
+  SmallVector<Timer *, 8> TimerStack; //< Stack of currently active timers.
+  PassTiming TimingInfo;              //< Timers mapped to the passes.
+};
----------------
chandlerc wrote:
> What is the advantage of having two separate types here? (Not a rhetorical question, just isn't obvious to me on reading the code.)
TimingInfo is a data that we collect and then report.
And TimerStack is a helper for the instrumentation to keep the context of pass managers as they are being executed as of this moment.
At the end of collection TimerStack is empty.

I feel it somewhat convenient to mentally separate them.
But I dont have any strong feelings about that.


Repository:
  rL LLVM

https://reviews.llvm.org/D51276





More information about the llvm-commits mailing list