diff options
author | Devang Patel <dpatel@apple.com> | 2006-12-07 21:32:57 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2006-12-07 21:32:57 +0000 |
commit | 877bfbb9ef75e7fe333d93abecaf0579780ccf54 (patch) | |
tree | 892a95524c8a4de241d19363bbd6dd3b4c7ab7ed /lib | |
parent | eb0d613ef6755f93610e08534a203c41ec14b56a (diff) |
Top level manages schedule the pass immediately at the time of insertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index dfcfcf89d2..a8ec28f755 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -346,7 +346,9 @@ public: /// PassManager_X is destroyed, the pass will be destroyed as well, so /// there is no need to delete the pass. (TODO delete passes.) /// This implies that all passes MUST be allocated with 'new'. - void add(Pass *P) { /* TODO*/ } + void add(Pass *P) { + schedulePass(P, this); + } /// Add pass into the pass manager queue. bool addPass(Pass *P); @@ -407,7 +409,8 @@ private: }; /// PassManager_New manages ModulePassManagers -class PassManagerImpl_New : public PMDataManager, +class PassManagerImpl_New : public Pass, + public PMDataManager, public PMTopLevelManager { public: @@ -416,7 +419,9 @@ public: /// the Pass to the PassManager. When the PassManager is destroyed, the pass /// will be destroyed as well, so there is no need to delete the pass. This /// implies that all passes MUST be allocated with 'new'. - void add(Pass *P); + void add(Pass *P) { + schedulePass(P, this); + } /// run - Execute all of the passes scheduled for execution. Keep track of /// whether any of the passes modifies the module, and if so, return true. @@ -870,13 +875,6 @@ Pass *PassManagerImpl_New::getAnalysisPassFromManager(AnalysisID AID) { return P; } -/// Add pass P to the queue of passes to run. -void PassManagerImpl_New::add(Pass *P) { - // Do not process Analysis now. Analysis is process while scheduling - // the pass vector. - addPassToManager(P, false); -} - // PassManager_New implementation /// Add P into active pass manager or use new module pass manager to /// manage it. |