Devang Patel
1c56a638a4
Add PMStack, a Pass Manager stack.
...
Eventually, Top level pass managers will use this to keep track of
active pass managers. Eass pass will also learn how to find appropriate
manager from these managers stack.
llvm-svn: 33018
2007-01-08 19:29:38 +00:00
Devang Patel
b66334b73b
1) Remove old AnalysisResolver.
...
2) Rename AnalysisResolver_New as AnalysisResolver
llvm-svn: 32938
2007-01-05 22:47:07 +00:00
Devang Patel
c6b5a554a4
Remove old pass manager.
...
llvm-svn: 32927
2007-01-05 20:16:23 +00:00
Devang Patel
e3068403bd
At the beginning of run, initialize analyis info availability for _ALL_
...
pass managers. Otherwise, stale available analysis info, from the managers not
yet run, may cause pass manager to take wrong turn.
This fixes CBE test failures reported by nightly tester.
llvm-svn: 32726
2006-12-21 00:16:50 +00:00
Devang Patel
cb5128a8d9
Now, there is additional layer, referred in the comment,
...
in place to handle this correctly.
llvm-svn: 32684
2006-12-19 20:12:38 +00:00
Devang Patel
67d6a5e411
s/BasicBlockPassManager/BBPassManager/g
...
s/ModulePassManager/MPPassManager/g
s/FunctionPassManagerImpl_New/FunctionPassManagerImpl/g
s/PassManagerImpl_New/PassManagerImpl/g
Introduce FPPassManager to manage function passes and
BBPassManagers.
Now FunctionPassManagerImpl is an implementation class
used by externally visible FunctionPassManager to manage
FPPassManagers.
Module pass manager (MPPassManager) now manages FPPassManagers
and ModulePasses.
llvm-svn: 32679
2006-12-19 19:46:59 +00:00
Devang Patel
abfbe3bfda
Add getNumContainedPasses() and getContainedPass() inteface and use
...
it instead of passVectorBegin/End().
llvm-svn: 32620
2006-12-16 00:56:26 +00:00
Devang Patel
56d48ec501
Cosmetic changes, based on Chris's review.
...
llvm-svn: 32618
2006-12-15 22:57:49 +00:00
Devang Patel
991aebacba
Mark dump* routines const routines.
...
llvm-svn: 32610
2006-12-15 20:13:01 +00:00
Devang Patel
ffca910d45
Move PMTopLevelManager and TImingInfo into anon namespace.
...
llvm-svn: 32606
2006-12-15 19:39:30 +00:00
Devang Patel
832bc079b2
s/ForcedLastUses/TransferLastUses/g
...
Register pass has the its last user, otherwise sometimes no one will claim
LastUse.
Handle transferred last uses from child pass manager.
llvm-svn: 32589
2006-12-15 00:08:26 +00:00
Chris Lattner
ce22ca3fc6
random minor typographical changes
...
llvm-svn: 32579
2006-12-14 18:22:14 +00:00
Devang Patel
b8817b9b6e
Add -time-passes support.
...
llvm-svn: 32574
2006-12-14 00:59:42 +00:00
Devang Patel
f6d1d21355
Add debug-pass=Details support to print Required and Preserved Set info.
...
llvm-svn: 32573
2006-12-14 00:25:06 +00:00
Devang Patel
93a197c202
Add " Made Modification " messages in debug-pass=Executions output.
...
llvm-svn: 32572
2006-12-14 00:08:04 +00:00
Devang Patel
200d305c02
Add debug-pass=Executions support in new pass manager.
...
llvm-svn: 32571
2006-12-13 23:50:44 +00:00
Devang Patel
cfd70c4a46
Add -pass-debug=Arguments support in new manager.
...
llvm-svn: 32567
2006-12-13 22:10:00 +00:00
Chris Lattner
f0f611a76a
fit in 80 cols
...
llvm-svn: 32563
2006-12-13 21:56:10 +00:00
Devang Patel
03fb587348
Using PDL as a prefix for PassDebugLevel enums is not a good idea.
...
Fix it.
llvm-svn: 32562
2006-12-13 21:13:31 +00:00
Devang Patel
f1567a511f
Move enum PassDebugLevel from PassManagerT.h to Pass.h.
...
Use PDL as the prefix for these enums.
Define and use PassDebugging_New in new PassManager.
llvm-svn: 32554
2006-12-13 20:03:48 +00:00
Devang Patel
b67904d1dc
Add #ifdef switch toggle between old and new pass manager. However,
...
continue to use old pass manager at the moment. To use new manager
remove #define USE_OLD_PASSMANAGER 1 from Pass.h
llvm-svn: 32525
2006-12-13 02:36:01 +00:00
Devang Patel
08bed59d59
FunctionPassManager does not support runOnModule().
...
llvm-svn: 32519
2006-12-13 00:34:32 +00:00
Devang Patel
ab97cf4c7c
Implement PassManager_New destructors.
...
llvm-svn: 32517
2006-12-13 00:09:23 +00:00
Devang Patel
209b13990f
Remove unused constructor.
...
llvm-svn: 32516
2006-12-12 23:51:31 +00:00
Devang Patel
eda561762f
Add routines to dump pass manager queue.
...
llvm-svn: 32513
2006-12-12 23:34:33 +00:00
Devang Patel
1036b65ca0
FunctionPassManager()
...
Set AnalysisResolver_New and add FPM to PassManagers list.
llvm-svn: 32512
2006-12-12 23:27:37 +00:00
Devang Patel
745a696050
Do not runOnFunction on external functions.
...
llvm-svn: 32510
2006-12-12 23:15:28 +00:00
Devang Patel
47d7df7407
Initialize AnalysisImpls for each pass before executing the pass.
...
llvm-svn: 32509
2006-12-12 23:13:09 +00:00
Devang Patel
f58183dae1
collectRequiredAnalysisPasses().
...
Include RequiredTrainsitiveSet also.
llvm-svn: 32508
2006-12-12 23:09:32 +00:00
Devang Patel
be6bd55e96
removeNotPreservedAnalysis().
...
Do not remove ImmutablePass from the list.
llvm-svn: 32507
2006-12-12 23:07:44 +00:00
Devang Patel
ad6b7fe726
Initialize activeManager.
...
llvm-svn: 32506
2006-12-12 22:57:43 +00:00
Devang Patel
5f945dd79e
Remove unused constructor.
...
llvm-svn: 32505
2006-12-12 22:56:36 +00:00
Devang Patel
75cdf20412
Maintain ImmutablePasses list at top level only. Do not make them
...
directly available to individual managers.
llvm-svn: 32504
2006-12-12 22:53:40 +00:00
Devang Patel
cd6ba15364
findAnalysisPass().
...
First search all available passes before searching ImmutablePasses.
llvm-svn: 32503
2006-12-12 22:50:05 +00:00
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
Devang Patel
42add710fa
Do not derive CommonPassManagerImpl from Pass.
...
Now BasicBlockPassManager_New is a FunctionPass,
FunctionPassManager_New is a ModulePass
llvm-svn: 31744
2006-11-15 01:11:27 +00:00
Devang Patel
07f4f58945
Copy initializeAnalysisImpl() implementation from PassManagerT.
...
Update LastUser to recursively walk required transitive set.
llvm-svn: 31741
2006-11-14 21:49:36 +00:00
Devang Patel
ca1892699c
Implement removeDeadPasses().
...
llvm-svn: 31722
2006-11-14 03:05:08 +00:00
Devang Patel
3f0832a3b5
Keep track of Last user of analysis phase.
...
llvm-svn: 31721
2006-11-14 02:54:23 +00:00
Devang Patel
f60b5d9676
Use std::map to map AnalysisID and Pass.
...
llvm-svn: 31720
2006-11-14 01:59:59 +00:00
Devang Patel
050ec72ae4
Manage analysis passes during run.
...
llvm-svn: 31716
2006-11-14 01:23:29 +00:00
Devang Patel
dafa4ddc46
Update comments.
...
llvm-svn: 31713
2006-11-14 00:03:04 +00:00
Devang Patel
7086844634
Update PassManagerImpl_New::analysisCurrentlyAvailable to check all
...
managed passmanagers.
llvm-svn: 31710
2006-11-13 22:53:19 +00:00
Devang Patel
ebba970a6d
Check currently available anlysis in active managers.
...
llvm-svn: 31709
2006-11-13 22:40:09 +00:00
Devang Patel
1a6eaa49fe
Implement schedulePasses().
...
llvm-svn: 31671
2006-11-11 02:22:31 +00:00
Devang Patel
db789fb8f2
Implement PassManagerImpl_New::add().
...
Just add pass into the pass manager queue without processing analysis.
llvm-svn: 31670
2006-11-11 02:06:21 +00:00
Devang Patel
90b05e0bc3
While adding pass into the manager, process Analysis only if it is
...
required to do so.
llvm-svn: 31669
2006-11-11 02:04:19 +00:00
Devang Patel
2efbad4a72
Remove dead code.
...
llvm-svn: 31668
2006-11-11 01:56:39 +00:00
Devang Patel
8cad70de14
Code refactoring. Move common code into CommonPassManagerImpl :)
...
llvm-svn: 31667
2006-11-11 01:51:02 +00:00
Devang Patel
a98445962d
Move CommonPassManagerImpl from PassManager.h to PassManager.cpp
...
llvm-svn: 31666
2006-11-11 01:31:05 +00:00
Devang Patel
349170f5da
Remove analysis that is not preserved by the pass from AvailableAnalysis.
...
llvm-svn: 31665
2006-11-11 01:24:55 +00:00
Devang Patel
643676c1f5
Keep track if analysis made available by the pass.
...
llvm-svn: 31664
2006-11-11 01:10:19 +00:00
Devang Patel
6c9f548704
Keep track of analysis required by the passes. Force use of new pass
...
manager if a pass does not preserve analysis that is used by other
passes.
llvm-svn: 31659
2006-11-11 00:42:16 +00:00
Devang Patel
0ed477969f
s/PassManagerAnalysisHelper/CommonPassManagerImpl
...
Inherit CommonPassManagerImpl from Pass.
llvm-svn: 31642
2006-11-10 21:33:13 +00:00
Devang Patel
4e12f86a1b
Split FunctionPassManager_New into FunctionPassManager_New and FunctionPassManagerImpl_New.
...
FunctionPassManagerImpl_New implements the pass manager.
FunctionPassManager_New is the public interface.
llvm-svn: 31547
2006-11-08 10:44:40 +00:00
Devang Patel
376fefafb2
Split PassManager_New into PassManager_New and PassManagerImpl_New.
...
PassManagerImpl_New implements the pass manager.
PassManager_New is the public interface.
llvm-svn: 31546
2006-11-08 10:29:57 +00:00
Devang Patel
ca58e3532f
Move BasicBlockPassManager_New, FunctionPassManager_New and
...
ModulePassManager_New class declarations from PassManager.h
to PassManager.cpp
llvm-svn: 31545
2006-11-08 10:05:38 +00:00
Devang Patel
d65e9e9fd8
Beautify.
...
llvm-svn: 31533
2006-11-08 01:31:28 +00:00
Devang Patel
3c8eb62560
Update new pass managers to use PassManagerAnalysisHelper API.
...
llvm-svn: 31526
2006-11-07 22:56:50 +00:00
Devang Patel
f68a34908d
Introduce PassManagerAnalysisHelper.
...
llvm-svn: 31522
2006-11-07 22:35:17 +00:00
Devang Patel
c290c8a2c8
Add PassManager_New.
...
llvm-svn: 31521
2006-11-07 22:23:34 +00:00
Devang Patel
05e1a970f3
Add ModulePassManager_New.
...
llvm-svn: 31517
2006-11-07 22:03:15 +00:00
Devang Patel
0c2012ffb3
Add FunctionPassManager_New.
...
llvm-svn: 31515
2006-11-07 21:49:50 +00:00
Devang Patel
6e5a113923
Add BasicBlockPassManager_New.
...
llvm-svn: 31513
2006-11-07 21:31:57 +00:00