diff options
author | Devang Patel <dpatel@apple.com> | 2006-12-09 00:07:38 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2006-12-09 00:07:38 +0000 |
commit | cd520b187a222bf99d4238590e6517e87666e39f (patch) | |
tree | 4599bc0f333f81b3cde4d091b23c6bd087f46798 /lib/VMCore/PassManager.cpp | |
parent | c9a6293af7b433146d8f7ecf8fa494b530af9376 (diff) |
Use analysis resolver to find the info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/PassManager.cpp')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 688dfee195..20925c80d4 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -243,13 +243,13 @@ Pass *PMTopLevelManager::findAnalysisPass(AnalysisID AID) { // Check pass managers for (std::vector<Pass *>::iterator I = PassManagers.begin(), - E = PassManagers.end(); P == NULL && I != E; ++I) - P = NULL; // FIXME: (*I)->findAnalysisPass(AID, false /* Search downward */); + E = PassManagers.end(); P == NULL && I != E; ++I) + P = (*I)->getResolver()->getAnalysisToUpdate(AID, false); // Check other pass managers for (std::vector<Pass *>::iterator I = OtherPassManagers.begin(), - E = OtherPassManagers.end(); P == NULL && I != E; ++I) - P = NULL; // FIXME: (*I)->findAnalysisPass(AID, false /* Search downward */); + E = OtherPassManagers.end(); P == NULL && I != E; ++I) + P = (*I)->getResolver()->getAnalysisToUpdate(AID, false); return P; } @@ -614,7 +614,10 @@ void PMDataManager::addPassToManager(Pass *P, E = RequiredPasses.end(); I != E; ++I) { Pass *PRequired = *I; unsigned RDepth = 0; - //FIXME: RDepth = PRequired->getResolver()->getDepth(); + + PMDataManager &DM = PRequired->getResolver()->getPMDataManager(); + RDepth = DM.getDepth(); + if (PDepth == RDepth) LastUses.push_back(PRequired); else if (PDepth > RDepth) { @@ -694,9 +697,9 @@ Pass *PMDataManager::findAnalysisPass(AnalysisID AID, bool SearchParent) { // One solution is to collect managers in advance at TPM level. Pass *P = NULL; for(std::vector<Pass *>::iterator I = passVectorBegin(), - E = passVectorEnd(); P == NULL && I!= E; ++I ) - P = NULL; // FIXME : P = (*I)->getResolver()->getAnalysisToUpdate(AID, false /* Do not search parents again */); - + E = passVectorEnd(); P == NULL && I!= E; ++I ) { + P = (*I)->getResolver()->getAnalysisToUpdate(AID, false /* Do not search parents again */); + } return P; } |