aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/PassManager.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp
index bf306e9d5c..0dff67f272 100644
--- a/lib/VMCore/PassManager.cpp
+++ b/lib/VMCore/PassManager.cpp
@@ -160,7 +160,8 @@ void PMTopLevelManager::collectLastUses(std::vector<Pass *> &LastUses,
LastUses.push_back(LUI->first);
}
-
+//===----------------------------------------------------------------------===//
+// PMDataManager
/// PMDataManager provides the common place to manage the analysis data
/// used by pass managers.
@@ -168,6 +169,10 @@ class PMDataManager {
public:
+ PMDataManager() : TPM(NULL) {
+ initializeAnalysisInfo();
+ }
+
/// Return true IFF pass P's required analysis set does not required new
/// manager.
bool manageablePass(Pass *P);
@@ -222,6 +227,10 @@ public:
// TODO : Check if pass P is available.
}
+ // Access toplevel manager
+ PMTopLevelManager *getTopLevelManager() { return TPM; }
+ void setTopLevelManager(PMTopLevelManager *T) { TPM = T; }
+
private:
// Set of available Analysis. This information is used while scheduling
// pass. If a pass requires an analysis which is not not available then
@@ -235,6 +244,10 @@ private:
// Collection of pass that are managed by this manager
std::vector<Pass *> PassVector;
+
+ // Top level manager.
+ // TODO : Make it a reference.
+ PMTopLevelManager *TPM;
};
/// BasicBlockPassManager_New manages BasicBlockPass. It batches all the