Commit Graph

79 Commits

Author SHA1 Message Date
Devang Patel 10c2ca6874 Fix thinko.
While searching for a analysis in a pass manager, do not search it into
pass manager's manager.

llvm-svn: 32501
2006-12-12 22:47:13 +00:00
Devang Patel afb1f362c6 o s/OtherPassManagers/IndirectPassManagers
o Make IndirectPassManagers vector of PMDataManager *
o Move PMTopLevelManager implementation below all class declarations.

llvm-svn: 32499
2006-12-12 22:35:25 +00:00
Devang Patel 95257548c9 Initialize AnalysisImpls for ImmutablePass.
llvm-svn: 32498
2006-12-12 22:21:37 +00:00
Devang Patel 9c6290c53c Set top level manager.
llvm-svn: 32496
2006-12-12 22:02:16 +00:00
Devang Patel 984698ac24 Analysis resolver now manages AnalysisImpls for the given patch.
llvm-svn: 32389
2006-12-09 01:11:34 +00:00
Devang Patel 9d759b8854 Top level pass manager keeps track of other managers, so this can be
removed now.

llvm-svn: 32388
2006-12-09 00:09:12 +00:00
Devang Patel 64619bec14 Use analysis resolver to find the info.
llvm-svn: 32387
2006-12-09 00:07:38 +00:00
Devang Patel fa971cda8b Do not drop ImmutablePasses on the floor.
llvm-svn: 32386
2006-12-08 23:57:43 +00:00
Devang Patel d440cd92a5 Set AnalysisResolver for the passes when they are inserted into
pass manager queuer.

llvm-svn: 32385
2006-12-08 23:53:00 +00:00
Devang Patel 9bdf7d46f6 Add AnalysisResolver_New. It is a replacement for existing
AnalysisResolver.

llvm-svn: 32383
2006-12-08 23:28:54 +00:00
Devang Patel af1fca5f10 Keep track of other pass managers, that are not directly managed by
top level manager. Use this info to findAnalysisPass.

llvm-svn: 32382
2006-12-08 23:11:43 +00:00
Devang Patel 272908dcf2 Implement top level FunctionPassManager::run(Function &F)
llvm-svn: 32381
2006-12-08 22:57:48 +00:00
Devang Patel 5bbeb49130 Do not keep yet another list of pass managers in PassManagerImpl_New.
Use one provided by toplevel manager.

llvm-svn: 32380
2006-12-08 22:47:25 +00:00
Devang Patel df6c9ae208 Remove unused schedulePass() parameter.
llvm-svn: 32379
2006-12-08 22:34:02 +00:00
Devang Patel e31049fed5 Remove unused getAnalysisPass and getAnalysisPassFromManager
llvm-svn: 32378
2006-12-08 22:32:32 +00:00
Devang Patel 640c5bba77 Implement PMTopLevel::findAnalysisPass() and
PMDataManager::findAnalysisPass()

llvm-svn: 32377
2006-12-08 22:30:11 +00:00
Devang Patel 0e29e29cc5 During runOnModule() do initialization and finalization.
llvm-svn: 32371
2006-12-08 19:04:09 +00:00
Devang Patel 1929089ea2 Reuse code. Directly use runOnFunction().
llvm-svn: 32370
2006-12-08 19:03:05 +00:00
Devang Patel 1f65368a82 Implement FunctionPassManager_New::FunctionPassManager_New(ModuleProvider *P)
llvm-svn: 32368
2006-12-08 18:57:16 +00:00
Devang Patel e958559204 BasicBlockPassManager_New::runOnFunction()
Do initialization and finalization.

llvm-svn: 32346
2006-12-08 01:38:28 +00:00
Devang Patel 475c453c00 doInitialization and doFinalization for BasicBlockPassManager_New
llvm-svn: 32345
2006-12-08 00:59:05 +00:00
Devang Patel 17ad096dd8 Reimplement removeDeadPasses().
llvm-svn: 32344
2006-12-08 00:37:52 +00:00
Devang Patel bc03f13b75 set Last User.
llvm-svn: 32342
2006-12-07 23:55:10 +00:00
Devang Patel 4c36e6bee0 Maintain level(or depth) of pass manager in pass manager food chain.
llvm-svn: 32339
2006-12-07 23:24:58 +00:00
Devang Patel 1d6267cac3 New method, PMDataManager::collectRequiredAnalysisPasses()
llvm-svn: 32338
2006-12-07 23:05:44 +00:00
Devang Patel 4949fe01f1 When new pass manager is created, initialize available analysis info
of existing manager at the same level. Otherwise, such info may be
considered as available, which not true.

llvm-svn: 32334
2006-12-07 22:34:21 +00:00
Devang Patel f4805ce89a PMDataManager does not maintain LastUser info.
llvm-svn: 32332
2006-12-07 22:17:09 +00:00
Devang Patel 17bff0dbdc Make current pass info available _after_ removing info that is not
preserved.

llvm-svn: 32329
2006-12-07 22:09:36 +00:00
Devang Patel 642c1437cf Add TODOs
llvm-svn: 32328
2006-12-07 21:58:50 +00:00
Devang Patel 28bbcbed4f Fix thinko.
llvm-svn: 32327
2006-12-07 21:44:12 +00:00
Devang Patel 31217aff9b Top level manages schedule the pass immediately at the time of insertion.
llvm-svn: 32326
2006-12-07 21:32:57 +00:00
Devang Patel abcd1d38ed Now FunctionPassManagerImpl_New and PassManagerImpl_New derives from
PMTopLevelManager.

llvm-svn: 32325
2006-12-07 21:27:23 +00:00
Devang Patel de124185fa Reimplement schedulePass interface. Move it into PMTopLevelManager.
llvm-svn: 32324
2006-12-07 21:10:57 +00:00
Devang Patel b3900320c6 While initializing AvailableAnalysis info, make ImmutablePasses available
immediately.

llvm-svn: 32323
2006-12-07 21:02:08 +00:00
Devang Patel e0eb9d8e31 Add ImmutablePass into the list of info managed by top level pass
manager.

llvm-svn: 32322
2006-12-07 20:51:18 +00:00
Devang Patel 2e169c37ea If pass reserves all analysis info then each info is not separately
included in PreservedSet. So check getPreservesAll() first.

llvm-svn: 32319
2006-12-07 20:03:49 +00:00
Devang Patel f9d96b934d Pass Managers themselves do not invalidate any analysis info.
llvm-svn: 32318
2006-12-07 19:57:52 +00:00
Devang Patel f3827bc21d Add a handle to the top level pass manager in PMDataManager.
llvm-svn: 32317
2006-12-07 19:54:15 +00:00
Devang Patel a1514cbdea Cosmetic markers to divide code in separate chunks.
llvm-svn: 32316
2006-12-07 19:39:39 +00:00
Devang Patel e9976aa91d s/noteDownAvailableAnalysis/recordAvailableAnalysis
While recording available analysis, include interfaces implemented.

llvm-svn: 32315
2006-12-07 19:33:53 +00:00
Devang Patel f33f3ebd14 Add PMTopLevelManager. It is not used yet.
llvm-svn: 32314
2006-12-07 19:21:29 +00:00
Devang Patel 8f677cecaa RequiredAnalysis support is buggy and not used at the moment so remove
the code. Add TODO note.

llvm-svn: 32313
2006-12-07 18:47:25 +00:00
Devang Patel a6b6dcbb1b s/clearAnalysis/initializeAnalysisInfo/g
llvm-svn: 32312
2006-12-07 18:41:09 +00:00
Devang Patel dbe4a1eef2 s/CommonPassManagerImpl/PMDataManager/g
llvm-svn: 32311
2006-12-07 18:36:24 +00:00
Devang Patel 6fea285c82 Add overview of pass manager.
llvm-svn: 32309
2006-12-07 18:23:30 +00:00
Bill Wendling f3baad3ee1 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Bill Wendling dfc91897df Changed to using LLVM streams.
llvm-svn: 31955
2006-11-28 02:09:03 +00:00
Devang Patel 9f3083eef0 Add run(Function &F) support in FunctionPassManager_New
llvm-svn: 31756
2006-11-15 19:39:54 +00:00
Devang Patel 4a3fa4ff26 Tidy up marking of last analysis user pass.
llvm-svn: 31746
2006-11-15 01:48:14 +00:00
Devang Patel ff631ae600 Add doInitialization and doFinalization support in FunctionManager_New.
llvm-svn: 31745
2006-11-15 01:27:05 +00:00