[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp
Devang Patel
dpatel at apple.com
Tue Dec 12 14:02:31 PST 2006
Changes in directory llvm/lib/VMCore:
PassManager.cpp updated: 1.75 -> 1.76
---
Log message:
Set top level manager.
---
Diffs of the changes: (+10 -1)
PassManager.cpp | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletion(-)
Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.75 llvm/lib/VMCore/PassManager.cpp:1.76
--- llvm/lib/VMCore/PassManager.cpp:1.75 Fri Dec 8 19:11:34 2006
+++ llvm/lib/VMCore/PassManager.cpp Tue Dec 12 16:02:16 2006
@@ -333,7 +333,6 @@
std::vector<Pass *> ForcedLastUses;
// Top level manager.
- // TODO : Make it a reference.
PMTopLevelManager *TPM;
private:
@@ -814,6 +813,8 @@
FunctionPassManager_New::FunctionPassManager_New(ModuleProvider *P) {
FPM = new FunctionPassManagerImpl_New(0);
+ // FPM is the top level manager.
+ FPM->setTopLevelManager(FPM);
MP = P;
}
@@ -880,6 +881,8 @@
// Create and add new manager
activeBBPassManager =
new BasicBlockPassManager_New(getDepth() + 1);
+ // Inherit top level manager
+ activeBBPassManager->setTopLevelManager(this->getTopLevelManager());
addPassToManager(activeBBPassManager, false);
TPM->addOtherPassManager(activeBBPassManager);
@@ -1013,6 +1016,8 @@
activeFunctionPassManager =
new FunctionPassManagerImpl_New(getDepth() + 1);
addPassToManager(activeFunctionPassManager, false);
+ // Inherit top level manager
+ activeFunctionPassManager->setTopLevelManager(this->getTopLevelManager());
TPM->addOtherPassManager(activeFunctionPassManager);
// Add pass into new manager. This time it must succeed.
@@ -1077,6 +1082,8 @@
if (!activeManager || !activeManager->addPass(P)) {
activeManager = new ModulePassManager_New(getDepth() + 1);
+ // Inherit top level manager
+ activeManager->setTopLevelManager(this->getTopLevelManager());
// This top level manager is going to manage activeManager.
// Set up analysis resolver to connect them.
@@ -1108,6 +1115,8 @@
/// Create new pass manager
PassManager_New::PassManager_New() {
PM = new PassManagerImpl_New(0);
+ // PM is the top level manager
+ PM->setTopLevelManager(PM);
}
/// add - Add a pass to the queue of passes to run. This passes ownership of
More information about the llvm-commits
mailing list