[llvm] r362219 - ftime-trace: Trace loop passes
Russell Gallop via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 03:14:04 PDT 2019
Author: russell_gallop
Date: Fri May 31 03:14:04 2019
New Revision: 362219
URL: http://llvm.org/viewvc/llvm-project?rev=362219&view=rev
Log:
ftime-trace: Trace loop passes
These can take a significant amount of time in some builds.
Suggested by Andrea Di Biagio.
Differential Revision: https://reviews.llvm.org/D62666
Modified:
llvm/trunk/lib/Analysis/LoopPass.cpp
Modified: llvm/trunk/lib/Analysis/LoopPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopPass.cpp?rev=362219&r1=362218&r2=362219&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopPass.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopPass.cpp Fri May 31 03:14:04 2019
@@ -22,6 +22,7 @@
#include "llvm/IR/PassTimingInfo.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Timer.h"
+#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@@ -209,6 +210,8 @@ bool LPPassManager::runOnFunction(Functi
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
LoopPass *P = getContainedPass(Index);
+ llvm::TimeTraceScope LoopPassScope("RunLoopPass", P->getPassName());
+
dumpPassInfo(P, EXECUTION_MSG, ON_LOOP_MSG,
CurrentLoop->getHeader()->getName());
dumpRequiredSet(P);
More information about the llvm-commits
mailing list