From 27aaab2bd3c220d8466b34f6b959f74e1caac69b Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 12 Dec 2006 23:09:32 +0000 Subject: [PATCH] collectRequiredAnalysisPasses(). Include RequiredTrainsitiveSet also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32508 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/PassManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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