aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/LoopPass.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-30 02:38:19 +0000
committerChris Lattner <sabre@nondot.org>2010-03-30 02:38:19 +0000
commit9fa0eff30a0d4fcbc84ac3ada4c47620b5449043 (patch)
treebac215737ddc0243bb664ec87df4fda9195a4f0d /lib/Analysis/LoopPass.cpp
parent4bd24c257ed1ee10cef1f1b417e1dd2e52e21968 (diff)
downloadexternal_llvm-9fa0eff30a0d4fcbc84ac3ada4c47620b5449043.zip
external_llvm-9fa0eff30a0d4fcbc84ac3ada4c47620b5449043.tar.gz
external_llvm-9fa0eff30a0d4fcbc84ac3ada4c47620b5449043.tar.bz2
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
Diffstat (limited to 'lib/Analysis/LoopPass.cpp')
-rw-r--r--lib/Analysis/LoopPass.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp
index 2d613f6..f26c0eb 100644
--- a/lib/Analysis/LoopPass.cpp
+++ b/lib/Analysis/LoopPass.cpp
@@ -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);