aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/LoopPass.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-07-19 18:02:32 +0000
committerDevang Patel <dpatel@apple.com>2007-07-19 18:02:32 +0000
commit58e0ef1e90c3f6dbae213612b44e56f7d6d65ea7 (patch)
tree2bb0d2cd6c88f0733743b527d4e72274f9d332c7 /lib/Analysis/LoopPass.cpp
parent6b8337392cbdaacbdd8326f731daff1b11eba275 (diff)
Verify loop info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LoopPass.cpp')
-rw-r--r--lib/Analysis/LoopPass.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp
index f14a9baf98..dc3e86844e 100644
--- a/lib/Analysis/LoopPass.cpp
+++ b/lib/Analysis/LoopPass.cpp
@@ -157,18 +157,6 @@ void LPPassManager::getAnalysisUsage(AnalysisUsage &Info) const {
Info.setPreservesAll();
}
-/// verifyLoopInfo - Verify loop nest.
-void LPPassManager::verifyLoopInfo() {
- assert (LI && "Loop Info is missing");
-
- for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) {
- Loop *L = *I;
- assert (L->getHeader() && "Loop header is missing");
- assert (L->getLoopPreheader() && "Loop preheader is missing");
- assert (L->getLoopLatch() && "Loop latch is missing");
- }
-}
-
/// run - Execute all of the passes scheduled for execution. Keep track of
/// whether any of the passes modifies the function, and if so, return true.
bool LPPassManager::runOnFunction(Function &F) {
@@ -214,13 +202,13 @@ bool LPPassManager::runOnFunction(Function &F) {
LoopPass *LP = dynamic_cast<LoopPass *>(P);
assert (LP && "Invalid LPPassManager member");
LP->runOnLoop(CurrentLoop, *this);
- verifyLoopInfo();
StopPassTimer(P);
if (Changed)
dumpPassInfo(P, MODIFICATION_MSG, ON_LOOP_MSG, "");
dumpAnalysisSetInfo("Preserved", P, AnUsage.getPreservedSet());
-
+
+ verifyPreservedAnalysis(LP);
removeNotPreservedAnalysis(P);
recordAvailableAnalysis(P);
removeDeadPasses(P, "", ON_LOOP_MSG);