diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-30 04:03:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-30 04:03:22 +0000 |
commit | a782e75d487006cafffdc256b3c623307fee4dcf (patch) | |
tree | 51d267ca5c375c7dc00359f21d3d56a8fb64fc25 /lib/Analysis/LoopPass.cpp | |
parent | 0d2725ad696afb60c86076469031783669809739 (diff) |
reapply my timer rewrite with a change for PassManager to store
timers by pointer instead of by-value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LoopPass.cpp')
-rw-r--r-- | lib/Analysis/LoopPass.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp index 2d613f6de7..f26c0eb666 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); |