[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp
Devang Patel
dpatel at apple.com
Tue Nov 14 17:48:28 PST 2006
Changes in directory llvm/lib/VMCore:
PassManager.cpp updated: 1.30 -> 1.31
---
Log message:
Tidy up marking of last analysis user pass.
---
Diffs of the changes: (+11 -15)
PassManager.cpp | 26 +++++++++++---------------
1 files changed, 11 insertions(+), 15 deletions(-)
Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.30 llvm/lib/VMCore/PassManager.cpp:1.31
--- llvm/lib/VMCore/PassManager.cpp:1.30 Tue Nov 14 19:27:05 2006
+++ llvm/lib/VMCore/PassManager.cpp Tue Nov 14 19:48:14 2006
@@ -83,22 +83,9 @@
return PassVector.end();
}
- inline void setLastUser(Pass *P, Pass *LU) {
+ inline void setLastUser(Pass *P, Pass *LU) {
LastUser[P] = LU;
// TODO : Check if pass P is available.
-
- // Prolong live range of analyses that are needed after an analysis pass
- // is destroyed, for querying by subsequent passes
- AnalysisUsage AnUsage;
- P->getAnalysisUsage(AnUsage);
- const std::vector<AnalysisID> &IDs = AnUsage.getRequiredTransitiveSet();
- for (std::vector<AnalysisID>::const_iterator I = IDs.begin(),
- E = IDs.end(); I != E; ++I) {
- Pass *AnalysisPass = getAnalysisPass(*I); // getAnalysisPassFromManager(*I);
- assert (AnalysisPass && "Analysis pass is not available");
- setLastUser(AnalysisPass, LU);
- }
-
}
private:
@@ -671,8 +658,17 @@
schedulePass(AnalysisPass);
}
setLastUser (AnalysisPass, P);
+
+ // Prolong live range of analyses that are needed after an analysis pass
+ // is destroyed, for querying by subsequent passes
+ const std::vector<AnalysisID> &IDs = AnUsage.getRequiredTransitiveSet();
+ for (std::vector<AnalysisID>::const_iterator I = IDs.begin(),
+ E = IDs.end(); I != E; ++I) {
+ Pass *AP = getAnalysisPassFromManager(*I);
+ assert (AP && "Analysis pass is not available");
+ setLastUser(AP, P);
+ }
}
-
addPass(P);
}
More information about the llvm-commits
mailing list