[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp
Devang Patel
dpatel at apple.com
Thu Dec 7 13:27:38 PST 2006
Changes in directory llvm/lib/VMCore:
PassManager.cpp updated: 1.47 -> 1.48
---
Log message:
Now FunctionPassManagerImpl_New and PassManagerImpl_New derives from
PMTopLevelManager.
---
Diffs of the changes: (+13 -3)
PassManager.cpp | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.47 llvm/lib/VMCore/PassManager.cpp:1.48
--- llvm/lib/VMCore/PassManager.cpp:1.47 Thu Dec 7 15:10:57 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec 7 15:27:23 2006
@@ -327,8 +327,9 @@
/// It batches all function passes and basic block pass managers together and
/// sequence them to process one function at a time before processing next
/// function.
-class FunctionPassManagerImpl_New : public PMDataManager,
- public ModulePass {
+class FunctionPassManagerImpl_New : public ModulePass,
+ public PMDataManager,
+ public PMTopLevelManager {
public:
FunctionPassManagerImpl_New(ModuleProvider *P) { /* TODO */ }
FunctionPassManagerImpl_New() {
@@ -336,6 +337,10 @@
}
~FunctionPassManagerImpl_New() { /* TODO */ };
+ inline void addTopLevelPass(Pass *P) {
+ addPass(P);
+ }
+
/// add - Add a pass to the queue of passes to run. This passes
/// ownership of the Pass to the PassManager. When the
/// PassManager_X is destroyed, the pass will be destroyed as well, so
@@ -402,7 +407,8 @@
};
/// PassManager_New manages ModulePassManagers
-class PassManagerImpl_New : public PMDataManager {
+class PassManagerImpl_New : public PMDataManager,
+ public PMTopLevelManager {
public:
@@ -424,6 +430,10 @@
Info.setPreservesAll();
}
+ inline void addTopLevelPass(Pass *P) {
+ addPass(P);
+ }
+
private:
/// Add a pass into a passmanager queue.
More information about the llvm-commits
mailing list