[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
Fri Oct 5 11:19:32 PDT 2018


fedor.sergeev marked 3 inline comments as done.
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:
> fedor.sergeev wrote:
> > 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.
> I'm just suggesting to inline the `PassTiming` class into this one. Not seeing much utility in it being two types as opposed to one.
Hmm... i like the suggestion.
Iit appears that I was so much obsessed about keeping implementations of PassTiming in line that I just did not consider this. :-/


Repository:
  rL LLVM

https://reviews.llvm.org/D51276





More information about the llvm-commits mailing list