X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FLoopPass.cpp;h=43463cd8ef1cc6c13537b56facb61bb38c400f2e;hb=a10756ee657a4d43a48cca5c166919093930ed6b;hp=f3686fe67a2f1bfa9adc9157b6688c7b095adc43;hpb=5c12adaa8b92800d835ddd5c97723c6eb5628b5b;p=oota-llvm.git diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp index f3686fe67a2..43463cd8ef1 100644 --- a/lib/Analysis/LoopPass.cpp +++ b/lib/Analysis/LoopPass.cpp @@ -224,33 +224,47 @@ bool LPPassManager::runOnFunction(Function &F) { for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { Pass *P = getContainedPass(Index); - dumpPassInfo(P, EXECUTION_MSG, ON_LOOP_MSG, ""); + dumpPassInfo(P, EXECUTION_MSG, ON_LOOP_MSG, + CurrentLoop->getHeader()->getNameStr()); dumpRequiredSet(P); initializeAnalysisImpl(P); LoopPass *LP = dynamic_cast(P); + assert(LP && "Invalid LPPassManager member"); { PassManagerPrettyStackEntry X(LP, *CurrentLoop->getHeader()); - assert(LP && "Invalid LPPassManager member"); Timer *T = StartPassTimer(P); Changed |= LP->runOnLoop(CurrentLoop, *this); StopPassTimer(P, T); } if (Changed) - dumpPassInfo(P, MODIFICATION_MSG, ON_LOOP_MSG, ""); + dumpPassInfo(P, MODIFICATION_MSG, ON_LOOP_MSG, + skipThisLoop ? "" : + CurrentLoop->getHeader()->getNameStr()); 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); + removeDeadPasses(P, + skipThisLoop ? "" : + CurrentLoop->getHeader()->getNameStr(), + ON_LOOP_MSG); if (skipThisLoop) // Do not run other passes on this loop. @@ -263,7 +277,7 @@ bool LPPassManager::runOnFunction(Function &F) { if (skipThisLoop) for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { Pass *P = getContainedPass(Index); - freePass(P, "", ON_LOOP_MSG); + freePass(P, "", ON_LOOP_MSG); } // Pop the loop from queue after running all passes.