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

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 5 03:20:19 PDT 2018


chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.

Somewhat minor code simplification below. If it makes sense, feel free to land. If it doesn't honestly, feel free to explain why not and land. Even if I convince you, it's super simple to land as a follow-up. =]



================
Comment at: include/llvm/IR/PassTimingInfo.h:120
+  SmallVector<Timer *, 8> TimerStack; //< Stack of currently active timers.
+  PassTiming TimingInfo;              //< Timers mapped to the passes.
+};
----------------
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.


Repository:
  rL LLVM

https://reviews.llvm.org/D51276





More information about the llvm-commits mailing list