// Give pass a chance to prepare the stage.
P->preparePassManager(activeStack);
-#if 1
// If P is an analysis pass and it is available then do not
// generate the analysis again. Stale analysis info should not be
// available at this point.
if (P->getPassInfo() &&
P->getPassInfo()->isAnalysis() && findAnalysisPass(P->getPassInfo()))
return;
-#endif
AnalysisUsage AnUsage;
P->getAnalysisUsage(AnUsage);
if (F.isDeclaration())
return false;
+
+ // Collect inherited analysis from Module level pass manager.
+ populateInheritedAnalysis(TPM->activeStack);
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
FunctionPass *FP = getContainedPass(Index);
// [1] Create new Function Pass Manager
FPP = new FPPassManager(PMD->getDepth() + 1);
+ FPP->populateInheritedAnalysis(PMS);
// [2] Set up new manager's top level manager
PMTopLevelManager *TPM = PMD->getTopLevelManager();