diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2019-04-20 23:22:45 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2019-04-20 23:22:45 +0000 |
| commit | f2654b638d534ae6025dfe87484c0b5bdde4c6f8 (patch) | |
| tree | 8c0c2e7aefe2876aac51b55c3331db507b599818 /llvm | |
| parent | 65e1ddd713883f9951af5e45a07829ae98654b1a (diff) | |
| download | bcm5719-llvm-f2654b638d534ae6025dfe87484c0b5bdde4c6f8.tar.gz bcm5719-llvm-f2654b638d534ae6025dfe87484c0b5bdde4c6f8.zip | |
ftime-trace: Trace the name of the currently active pass as well.
Differential Revision: https://reviews.llvm.org/D60782
llvm-svn: 358834
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/IR/LegacyPassManager.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index e2717f7887e..3e8ec1a6709 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -1629,14 +1629,14 @@ bool FPPassManager::runOnFunction(Function &F) { FunctionSize = F.getInstructionCount(); } - bool ProfileTime = llvm::timeTraceProfilerEnabled(); - if (ProfileTime) - llvm::timeTraceProfilerBegin("OptFunction", F.getName()); + llvm::TimeTraceScope FunctionScope("OptFunction", F.getName()); for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { FunctionPass *FP = getContainedPass(Index); bool LocalChanged = false; + llvm::TimeTraceScope PassScope("RunPass", FP->getPassName()); + dumpPassInfo(FP, EXECUTION_MSG, ON_FUNCTION_MSG, F.getName()); dumpRequiredSet(FP); @@ -1674,9 +1674,6 @@ bool FPPassManager::runOnFunction(Function &F) { removeDeadPasses(FP, F.getName(), ON_FUNCTION_MSG); } - if (ProfileTime) - llvm::timeTraceProfilerEnd(); - return Changed; } |

