[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp
Devang Patel
dpatel at apple.com
Fri Dec 8 16:07:53 PST 2006
Changes in directory llvm/lib/VMCore:
PassManager.cpp updated: 1.72 -> 1.73
---
Log message:
Use analysis resolver to find the info.
---
Diffs of the changes: (+11 -8)
PassManager.cpp | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.72 llvm/lib/VMCore/PassManager.cpp:1.73
--- llvm/lib/VMCore/PassManager.cpp:1.72 Fri Dec 8 17:57:43 2006
+++ llvm/lib/VMCore/PassManager.cpp Fri Dec 8 18:07:38 2006
@@ -243,13 +243,13 @@
// 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 @@
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 @@
// 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;
}
More information about the llvm-commits
mailing list