X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FPassManager.cpp;h=e1f8afe3b0ea069f77589a5e26e8ac05ab080731;hb=56867520990a4fea1353d55f71bb74a0126554e6;hp=312379479d6a65dcda5c7adc1c47b703e4bf5a24;hpb=bed7e6849823042c442e7e88dba5d41f68982815;p=oota-llvm.git diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 312379479d6..e1f8afe3b0e 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -360,10 +360,10 @@ public: } }; -static TimingInfo *TheTimeInfo; - } // End of anon namespace +static TimingInfo *TheTimeInfo; + //===----------------------------------------------------------------------===// // PMTopLevelManager implementation @@ -621,9 +621,15 @@ void PMDataManager::removeNotPreservedAnalysis(Pass *P) { std::map::iterator Info = I++; if (!dynamic_cast(Info->second) && std::find(PreservedSet.begin(), PreservedSet.end(), Info->first) == - PreservedSet.end()) + PreservedSet.end()) { // Remove this analysis AvailableAnalysis.erase(Info); + if (PassDebugging >= Details) { + Pass *S = Info->second; + cerr << " -- " << P->getPassName() << " is not preserving "; + cerr << S->getPassName() << "\n"; + } + } } // Check inherited analysis also. If P is not preserving analysis @@ -659,6 +665,12 @@ void PMDataManager::removeDeadPasses(Pass *P, const char *Msg, TPM->collectLastUses(DeadPasses, P); + if (PassDebugging >= Details && !DeadPasses.empty()) { + cerr << " -*- " << P->getPassName(); + cerr << " is the last user of following pass instances."; + cerr << " Free these instances\n"; + } + for (SmallVector::iterator I = DeadPasses.begin(), E = DeadPasses.end(); I != E; ++I) { @@ -924,7 +936,11 @@ void PMDataManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) { // When Pass manager is not able to order required analysis info, Pass manager // checks whether any lower level manager will be able to provide this // analysis info on demand or not. - assert (0 && "Unable to handle Pass that requires lower level Analysis pass"); +#ifndef NDEBUG + cerr << "Unable to schedule " << RequiredPass->getPassName(); + cerr << " required by " << P->getPassName() << "\n"; +#endif + assert (0 && "Unable to schedule pass"); } // Destructor