fairly major rewrite of various timing related stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99862 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-03-30 02:38:19 +00:00
parent 4bd24c257e
commit 9fa0eff30a
6 changed files with 188 additions and 220 deletions
+7 -5
View File
@@ -14,6 +14,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Support/Timer.h"
using namespace llvm;
//===----------------------------------------------------------------------===//
@@ -228,9 +229,9 @@ bool LPPassManager::runOnFunction(Function &F) {
{
PassManagerPrettyStackEntry X(P, *CurrentLoop->getHeader());
Timer *T = StartPassTimer(P);
TimeRegion PassTimer(getPassTimer(P));
Changed |= P->runOnLoop(CurrentLoop, *this);
StopPassTimer(P, T);
}
if (Changed)
@@ -245,9 +246,10 @@ bool LPPassManager::runOnFunction(Function &F) {
// is a function pass and it's really expensive to verify every
// loop in the function every time. That level of checking can be
// enabled with the -verify-loop-info option.
Timer *T = StartPassTimer(LI);
CurrentLoop->verifyLoop();
StopPassTimer(LI, T);
{
TimeRegion PassTimer(getPassTimer(LI));
CurrentLoop->verifyLoop();
}
// Then call the regular verifyAnalysis functions.
verifyPreservedAnalysis(P);