summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2006-12-09 00:07:38 +0000
committerDevang Patel <dpatel@apple.com>2006-12-09 00:07:38 +0000
commit64619bec140750b8981becd16f4eadd2fc437954 (patch)
tree9baca144fa953618a3c0a220e8bc7d89b86f1b36 /llvm/lib
parentfa971cda8b046db9ee07aee8c6f64146e3320e07 (diff)
downloadbcm5719-llvm-64619bec140750b8981becd16f4eadd2fc437954.tar.gz
bcm5719-llvm-64619bec140750b8981becd16f4eadd2fc437954.zip
Use analysis resolver to find the info.
llvm-svn: 32387
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/PassManager.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/llvm/lib/VMCore/PassManager.cpp b/llvm/lib/VMCore/PassManager.cpp
index 688dfee1955..20925c80d4a 100644
--- a/llvm/lib/VMCore/PassManager.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud