diff options
author | Dan Gohman <gohman@apple.com> | 2009-09-28 00:27:48 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-09-28 00:27:48 +0000 |
commit | 9450b0e1a6154192ca597ad27f8eb6e6e807f7a4 (patch) | |
tree | 30b9306c15136bcce40db9d6de99e2ce201f581a /lib/Analysis/LoopPass.cpp | |
parent | f3f0c89f5f9c2ad99169084cbfedaf3ed0ee6a50 (diff) |
Move the dominator verification code out of special code embedded within
the PassManager code into a regular verifyAnalysis method.
Also, reorganize loop verification. Make the LoopPass infrastructure
call verifyLoop as needed instead of having LoopInfo::verifyAnalysis
check every loop in the function after each looop pass. Add a new
command-line argument, -verify-loop-info, to enable the expensive
full checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LoopPass.cpp')
-rw-r--r-- | lib/Analysis/LoopPass.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp index e297ab4207..22466ae3d0 100644 --- a/lib/Analysis/LoopPass.cpp +++ b/lib/Analysis/LoopPass.cpp @@ -242,16 +242,24 @@ bool LPPassManager::runOnFunction(Function &F) { dumpPassInfo(P, MODIFICATION_MSG, ON_LOOP_MSG, ""); dumpPreservedSet(P); - if (!skipThisLoop) + if (!skipThisLoop) { + // Manually check that this loop is still healthy. This is done + // instead of relying on LoopInfo::verifyLoop since LoopInfo + // 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); + + // Then call the regular verifyAnalysis functions. verifyPreservedAnalysis(LP); + } removeNotPreservedAnalysis(P); recordAvailableAnalysis(P); removeDeadPasses(P, "", ON_LOOP_MSG); - // If dominator information is available then verify the info if requested. - verifyDomInfo(*LP, F); - if (skipThisLoop) // Do not run other passes on this loop. break; |