diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 1f1890c31f6..3498fcf62f9 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -678,6 +678,14 @@ void PMDataManager::collectRequiredAnalysisPasses(std::vector &RP, assert (AnalysisPass && "Analysis pass is not available"); RP.push_back(AnalysisPass); } + + const std::vector &IDs = AnUsage.getRequiredTransitiveSet(); + for (std::vector::const_iterator I = IDs.begin(), + E = IDs.end(); I != E; ++I) { + Pass *AnalysisPass = findAnalysisPass(*I, true); + assert (AnalysisPass && "Analysis pass is not available"); + RP.push_back(AnalysisPass); + } } // All Required analyses should be available to the pass as it runs! Here