With the addition of the LLD time tracing it made sense to include coverage
for LLVM's various passes. Doing so ensures that ThinLTO is also covered
with a time trace.
Before:
After:
Paths
| Differential D74516
Extend TimeTrace to LLVM's new pass manager ClosedPublic Authored by amonshiz on Feb 12 2020, 3:50 PM.
Details Summary
Diff Detail Event Timelineamonshiz added a parent revision: D74514: Refactor TimeProfiler write methods (NFC).Feb 12 2020, 3:50 PM Comment Actions Friendly ping for reviews on this one. I've found this to be a great tool for debugging the passes running during ThinLTO. Comment Actions I've faced with objections from @philip.pfaffe trying to implement the same: D62067. Since that time, trace profiler has supported multiple threads (D71059), so I do believe this can now correctly work. I would wait for review from new pm guys. Comment Actions lgtm! Sorry for the delay, I have been busy. I hadn't opened this up until now, but it seems straightforward, I don't think we need additional thorough review from local area code owners. This revision is now accepted and ready to land.Mar 4 2020, 4:42 PM Comment Actions Based on perusing https://reviews.llvm.org/p/amonshiz/, I assume you need someone to push this. I'll go ahead and do that. Closed by commit rGc5a06019d234: Extend TimeTrace to LLVM's new pass manager (authored by amonshiz, committed by rnk). · Explain WhyMar 6 2020, 2:57 PM This revision was automatically updated to reflect the committed changes. Comment Actions I'm sorry for the late comment, but this should have really been done through the PassInstrumentation framework. Comment Actions As an explanation why PassInstrumentation is a better choice - you do not need to manually extend all the individual pass managers, Comment Actions
AFAII, this couldn't be done using register[Before/After]PassCallback() (like here llvm/lib/IR/PassTimingInfo.cpp) since profiler timer have to be assuredly finished if started, and that should be done directly by inserting [start/stop]TimeProfiler() in run[Before/After/Pass/Invalidated]().
Revision Contents
Diff 245178 llvm/include/llvm/Analysis/CGSCCPassManager.h
llvm/include/llvm/IR/PassManager.h
llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
llvm/lib/Analysis/CGSCCPassManager.cpp
llvm/lib/Transforms/Scalar/LoopPassManager.cpp
llvm/test/Other/new-pm-time-trace.ll
llvm/tools/opt/opt.cpp
|