1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
Commit Graph

203 Commits

Author SHA1 Message Date
Devang Patel
d3ea9ae6e9 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
8213655f44 random minor typographical changes
llvm-svn: 32579
2006-12-14 18:22:14 +00:00
Devang Patel
6a85af195a Add -time-passes support.
llvm-svn: 32574
2006-12-14 00:59:42 +00:00
Devang Patel
76ecbc449f 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
740b960858 Add " Made Modification " messages in debug-pass=Executions output.
llvm-svn: 32572
2006-12-14 00:08:04 +00:00
Devang Patel
b726becbcd Add debug-pass=Executions support in new pass manager.
llvm-svn: 32571
2006-12-13 23:50:44 +00:00
Devang Patel
5a200bf480 Add -pass-debug=Arguments support in new manager.
llvm-svn: 32567
2006-12-13 22:10:00 +00:00
Chris Lattner
e8d97c0b07 fit in 80 cols
llvm-svn: 32563
2006-12-13 21:56:10 +00:00
Devang Patel
58ac5db67f 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
7208b2e3e6 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
3c8836df17 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
ad1c3bba52 FunctionPassManager does not support runOnModule().
llvm-svn: 32519
2006-12-13 00:34:32 +00:00
Devang Patel
ae0e0cdff7 Implement PassManager_New destructors.
llvm-svn: 32517
2006-12-13 00:09:23 +00:00
Devang Patel
da35cdf10e Remove unused constructor.
llvm-svn: 32516
2006-12-12 23:51:31 +00:00
Devang Patel
ae9da674a1 Add routines to dump pass manager queue.
llvm-svn: 32513
2006-12-12 23:34:33 +00:00
Devang Patel
b26731c9cd FunctionPassManager()
Set AnalysisResolver_New and add FPM to PassManagers list.

llvm-svn: 32512
2006-12-12 23:27:37 +00:00
Devang Patel
e08024130b Do not runOnFunction on external functions.
llvm-svn: 32510
2006-12-12 23:15:28 +00:00
Devang Patel
09032bc2b0 Initialize AnalysisImpls for each pass before executing the pass.
llvm-svn: 32509
2006-12-12 23:13:09 +00:00
Devang Patel
e969385cb9 collectRequiredAnalysisPasses().
Include RequiredTrainsitiveSet also.

llvm-svn: 32508
2006-12-12 23:09:32 +00:00
Devang Patel
8a5442e16d removeNotPreservedAnalysis().
Do not remove ImmutablePass from the list.

llvm-svn: 32507
2006-12-12 23:07:44 +00:00
Devang Patel
94bb02ef16 Initialize activeManager.
llvm-svn: 32506
2006-12-12 22:57:43 +00:00
Devang Patel
a756f126ea Remove unused constructor.
llvm-svn: 32505
2006-12-12 22:56:36 +00:00
Devang Patel
ea7846dd99 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
4d694e6674 findAnalysisPass().
First search all available passes before searching ImmutablePasses.

llvm-svn: 32503
2006-12-12 22:50:05 +00:00
Devang Patel
921f11b896 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
a3a8aeb459 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
bda67816fd Initialize AnalysisImpls for ImmutablePass.
llvm-svn: 32498
2006-12-12 22:21:37 +00:00
Devang Patel
f2e0fe66cd Set top level manager.
llvm-svn: 32496
2006-12-12 22:02:16 +00:00
Devang Patel
1dab3b3558 Analysis resolver now manages AnalysisImpls for the given patch.
llvm-svn: 32389
2006-12-09 01:11:34 +00:00
Devang Patel
a330306e9b 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
73cf028f5f Use analysis resolver to find the info.
llvm-svn: 32387
2006-12-09 00:07:38 +00:00
Devang Patel
385edd79c5 Do not drop ImmutablePasses on the floor.
llvm-svn: 32386
2006-12-08 23:57:43 +00:00
Devang Patel
4e6c9b0ad9 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
6f0bb6fbed Add AnalysisResolver_New. It is a replacement for existing
AnalysisResolver.

llvm-svn: 32383
2006-12-08 23:28:54 +00:00
Devang Patel
17fec0924c 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
1342f262e3 Implement top level FunctionPassManager::run(Function &F)
llvm-svn: 32381
2006-12-08 22:57:48 +00:00
Devang Patel
ddcef36da4 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
f0c7476178 Remove unused schedulePass() parameter.
llvm-svn: 32379
2006-12-08 22:34:02 +00:00
Devang Patel
8ff822772f Remove unused getAnalysisPass and getAnalysisPassFromManager
llvm-svn: 32378
2006-12-08 22:32:32 +00:00
Devang Patel
a4ef9062bf Implement PMTopLevel::findAnalysisPass() and
PMDataManager::findAnalysisPass()

llvm-svn: 32377
2006-12-08 22:30:11 +00:00
Devang Patel
7f1091cb14 During runOnModule() do initialization and finalization.
llvm-svn: 32371
2006-12-08 19:04:09 +00:00
Devang Patel
ebab6b3112 Reuse code. Directly use runOnFunction().
llvm-svn: 32370
2006-12-08 19:03:05 +00:00
Devang Patel
4833df8e9e Implement FunctionPassManager_New::FunctionPassManager_New(ModuleProvider *P)
llvm-svn: 32368
2006-12-08 18:57:16 +00:00
Devang Patel
94eedf9be1 BasicBlockPassManager_New::runOnFunction()
Do initialization and finalization.

llvm-svn: 32346
2006-12-08 01:38:28 +00:00
Devang Patel
0fc48cda15 doInitialization and doFinalization for BasicBlockPassManager_New
llvm-svn: 32345
2006-12-08 00:59:05 +00:00
Devang Patel
67bb3725d4 Reimplement removeDeadPasses().
llvm-svn: 32344
2006-12-08 00:37:52 +00:00
Devang Patel
3364b5821e set Last User.
llvm-svn: 32342
2006-12-07 23:55:10 +00:00
Devang Patel
df9f0e26f9 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
19a733b718 New method, PMDataManager::collectRequiredAnalysisPasses()
llvm-svn: 32338
2006-12-07 23:05:44 +00:00
Devang Patel
b361bb840c 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
967a319698 PMDataManager does not maintain LastUser info.
llvm-svn: 32332
2006-12-07 22:17:09 +00:00
Devang Patel
9be7d811ae 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
145469fbf2 Add TODOs
llvm-svn: 32328
2006-12-07 21:58:50 +00:00
Devang Patel
a15af91097 Fix thinko.
llvm-svn: 32327
2006-12-07 21:44:12 +00:00
Devang Patel
b945504462 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
ff5d922b04 Now FunctionPassManagerImpl_New and PassManagerImpl_New derives from
PMTopLevelManager.

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

llvm-svn: 32323
2006-12-07 21:02:08 +00:00
Devang Patel
adf0a3a147 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
0117a3e391 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
318adc0e9d Pass Managers themselves do not invalidate any analysis info.
llvm-svn: 32318
2006-12-07 19:57:52 +00:00
Devang Patel
8c988e1dc2 Add a handle to the top level pass manager in PMDataManager.
llvm-svn: 32317
2006-12-07 19:54:15 +00:00
Devang Patel
e6f5ded0ef Cosmetic markers to divide code in separate chunks.
llvm-svn: 32316
2006-12-07 19:39:39 +00:00
Devang Patel
89a14dfcd0 s/noteDownAvailableAnalysis/recordAvailableAnalysis
While recording available analysis, include interfaces implemented.

llvm-svn: 32315
2006-12-07 19:33:53 +00:00
Devang Patel
e4c87643a5 Add PMTopLevelManager. It is not used yet.
llvm-svn: 32314
2006-12-07 19:21:29 +00:00
Devang Patel
7e140ec79c 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
b43799cea4 s/clearAnalysis/initializeAnalysisInfo/g
llvm-svn: 32312
2006-12-07 18:41:09 +00:00
Devang Patel
364530904f s/CommonPassManagerImpl/PMDataManager/g
llvm-svn: 32311
2006-12-07 18:36:24 +00:00
Devang Patel
580df8ade2 Add overview of pass manager.
llvm-svn: 32309
2006-12-07 18:23:30 +00:00
Bill Wendling
a3246c4272 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
aa02717a76 Changed to using LLVM streams.
llvm-svn: 31955
2006-11-28 02:09:03 +00:00
Devang Patel
6060a1e3dc Add run(Function &F) support in FunctionPassManager_New
llvm-svn: 31756
2006-11-15 19:39:54 +00:00
Devang Patel
c252225cec Tidy up marking of last analysis user pass.
llvm-svn: 31746
2006-11-15 01:48:14 +00:00
Devang Patel
343e099f5d Add doInitialization and doFinalization support in FunctionManager_New.
llvm-svn: 31745
2006-11-15 01:27:05 +00:00
Devang Patel
55ee589fb9 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
4f5849544b 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
bb3da3a9a1 Implement removeDeadPasses().
llvm-svn: 31722
2006-11-14 03:05:08 +00:00
Devang Patel
816f60d7e9 Keep track of Last user of analysis phase.
llvm-svn: 31721
2006-11-14 02:54:23 +00:00
Devang Patel
2b9bd4aa34 Use std::map to map AnalysisID and Pass.
llvm-svn: 31720
2006-11-14 01:59:59 +00:00
Devang Patel
bcc72c8a5a Manage analysis passes during run.
llvm-svn: 31716
2006-11-14 01:23:29 +00:00
Devang Patel
fa6da87694 Update comments.
llvm-svn: 31713
2006-11-14 00:03:04 +00:00
Devang Patel
5297c37d63 Update PassManagerImpl_New::analysisCurrentlyAvailable to check all
managed passmanagers.

llvm-svn: 31710
2006-11-13 22:53:19 +00:00
Devang Patel
84dd1c2764 Check currently available anlysis in active managers.
llvm-svn: 31709
2006-11-13 22:40:09 +00:00
Devang Patel
27cf4a91e7 Implement schedulePasses().
llvm-svn: 31671
2006-11-11 02:22:31 +00:00
Devang Patel
b324dacabf 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
f00e57a19c 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
0eb0bad5e8 Remove dead code.
llvm-svn: 31668
2006-11-11 01:56:39 +00:00
Devang Patel
71420afe60 Code refactoring. Move common code into CommonPassManagerImpl :)
llvm-svn: 31667
2006-11-11 01:51:02 +00:00
Devang Patel
785d727d1c Move CommonPassManagerImpl from PassManager.h to PassManager.cpp
llvm-svn: 31666
2006-11-11 01:31:05 +00:00
Devang Patel
9e926cd9f8 Remove analysis that is not preserved by the pass from AvailableAnalysis.
llvm-svn: 31665
2006-11-11 01:24:55 +00:00
Devang Patel
124cfa3f26 Keep track if analysis made available by the pass.
llvm-svn: 31664
2006-11-11 01:10:19 +00:00
Devang Patel
1bff0f0174 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
a9504181aa s/PassManagerAnalysisHelper/CommonPassManagerImpl
Inherit CommonPassManagerImpl from Pass.

llvm-svn: 31642
2006-11-10 21:33:13 +00:00
Devang Patel
0aa28c8146 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
12982590fa 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
03dc236bdd 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
432399869d Beautify.
llvm-svn: 31533
2006-11-08 01:31:28 +00:00
Devang Patel
47de6ddc07 Update new pass managers to use PassManagerAnalysisHelper API.
llvm-svn: 31526
2006-11-07 22:56:50 +00:00
Devang Patel
fece2777c4 Introduce PassManagerAnalysisHelper.
llvm-svn: 31522
2006-11-07 22:35:17 +00:00
Devang Patel
6d4ef98c03 Add PassManager_New.
llvm-svn: 31521
2006-11-07 22:23:34 +00:00
Devang Patel
cacc940858 Add ModulePassManager_New.
llvm-svn: 31517
2006-11-07 22:03:15 +00:00
Devang Patel
9a2c6538dd Add FunctionPassManager_New.
llvm-svn: 31515
2006-11-07 21:49:50 +00:00
Devang Patel
b7d2cd5ec2 Add BasicBlockPassManager_New.
llvm-svn: 31513
2006-11-07 21:31:57 +00:00