diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-30 02:38:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-30 02:38:19 +0000 |
commit | 57a0542397d898bbdd103004a57b4deb0c14e55e (patch) | |
tree | aa7ec1f38a48625a5bcc6a8e01cea9487994c77a /llvm/lib/Analysis/LoopPass.cpp | |
parent | 85e64359df64503dca8eb31fab2fa1b08d943913 (diff) | |
download | bcm5719-llvm-57a0542397d898bbdd103004a57b4deb0c14e55e.tar.gz bcm5719-llvm-57a0542397d898bbdd103004a57b4deb0c14e55e.zip |
fairly major rewrite of various timing related stuff.
llvm-svn: 99862
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopPass.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index 2d613f6de71..f26c0eb6668 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/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); |