Devang Patel
d56e4919df
Fix quotes in debug messages.
...
llvm-svn: 37630
2007-06-18 21:32:29 +00:00
Devang Patel
4d01a7b1b5
If user wants to run instcombine twice, do not block it.
...
llvm-svn: 37301
2007-05-23 05:08:52 +00:00
Devang Patel
8c78a0bff0
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
e95c6ad802
Use 'static const char' instead of 'static const int'.
...
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
09f162ca6a
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Devang Patel
68f72b17f2
Use toplevel function pass manager as OnTheFly manager.
...
llvm-svn: 36481
2007-04-26 17:50:19 +00:00
Devang Patel
9294281ac1
Proivde getAnalysis<FPAnalysis>(Func) support.
...
llvm-svn: 36159
2007-04-16 20:56:24 +00:00
Devang Patel
56a5c620fe
Do not assert during analysis implementation initialization.
...
llvm-svn: 36158
2007-04-16 20:44:16 +00:00
Devang Patel
2ff4492a2c
Print and delete on the fly pass managers.
...
llvm-svn: 36157
2007-04-16 20:39:59 +00:00
Devang Patel
69e9f6d7c4
Update module pass manager to support module passes that require
...
function passes.
llvm-svn: 36154
2007-04-16 20:27:05 +00:00
Devang Patel
e64d30573f
Give each pass manager chance to manage lower level analysis pass, which is
...
pass required by one of pass managed by the manager.
llvm-svn: 36153
2007-04-16 20:12:57 +00:00
Anton Korobeynikov
fb80151c42
Removed tabs everywhere except autogenerated & external files. Add make
...
target for tabs checking.
llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Devang Patel
01919d2c0b
Speed Up Pass Manager.
...
- Check Immutableness before searching PreservedSet.
- Avoid unnecessary traversal while setting Last User.
llvm-svn: 35028
2007-03-08 19:05:01 +00:00
Devang Patel
9d9fc90952
Keep track of higher level analysis.
...
llvm-svn: 34974
2007-03-06 17:52:53 +00:00
Devang Patel
42dd1e92c7
Keep track of inherited analysis. For example, if a loop pass does not
...
preserve dominator info then it should update parent FPPassManager's
available analysis info to reflect this.
llvm-svn: 34942
2007-03-06 01:55:46 +00:00
Devang Patel
d74ede70fb
Add preparePassManager() hook. This allows each pass to check whether
...
current active pass manager is appropriate or not.
A loop pass may consider current LPPassManager in appropraite if loop
pass is not preserving analysis information that is used by other
passes managed by current LPPassManager. In such situation, loop pass
can pop current LPPassManager from the PMStack using this hook
and use new LPPassManager for itself.
llvm-svn: 34941
2007-03-06 01:06:16 +00:00
Devang Patel
ec2b9a7850
Current pass manager, not the parent pass manager, assumes the role of
...
last user when one of the managed pass uses info provided by parent pass
manager.
This was exposed by LPPassManager work.
llvm-svn: 34936
2007-03-05 22:57:49 +00:00
Devang Patel
003a559633
Avoid constructing std::strings unless pass debugging is ON.
...
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Devang Patel
7ebf09dbca
Account for time consumed by releaseMemory() properly.
...
llvm-svn: 34932
2007-03-05 18:20:51 +00:00
Jeff Cohen
b622c11f77
Unbreak VC++ build.
...
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Devang Patel
28349abeab
Make getPassManagerType() const.
...
llvm-svn: 34669
2007-02-27 15:00:39 +00:00
Chris Lattner
9df8be40fe
temporarily revert Devang's most recent patch, which caused a large
...
compile-time regression in LLC.
llvm-svn: 34385
2007-02-17 23:14:24 +00:00
Devang Patel
98354dabc1
Use inverted map to speedup collectLastUses().
...
llvm-svn: 34364
2007-02-17 03:53:44 +00:00
Devang Patel
4d06ace0ef
Do not drop transferred last uses on the floor.
...
Use handleLastUserOverflow().
llvm-svn: 34006
2007-02-07 19:37:53 +00:00
Devang Patel
3f806969ed
Fix PR1158
...
Do not insert Analysis pass, if it is already available.
llvm-svn: 33915
2007-02-05 19:34:17 +00:00
Devang Patel
e3858e6674
cvs commit
...
llvm-svn: 33765
2007-02-01 22:08:25 +00:00
Reid Spencer
5301e7c605
For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
...
confusion with external linkage types.
llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Devang Patel
1c3633e461
- Undo previous check-in (i.e. Do not export TimingInfo class through
...
PassManagers.h).
- Add StopPassTimer() and StartPassTimer() to expose TimingInfo to
CallGraphPassManager
- Use these two APIs in CalLgraphPassManager to measure timings.
llvm-svn: 33638
2007-01-29 23:10:37 +00:00
Devang Patel
55bcb50840
Move TimingInfo into PassManagers.h so that other libs can use it.
...
llvm-svn: 33626
2007-01-29 20:06:26 +00:00
Devang Patel
23f8aa921e
Update ModulePass::assignPassManager() to take into account Preferred
...
Pass Manager Type.
llvm-svn: 33308
2007-01-17 21:19:23 +00:00
Devang Patel
fd41843243
s/PassDebugging_New/PassDebugging/g
...
llvm-svn: 33307
2007-01-17 20:33:36 +00:00
Devang Patel
dffca63396
Update assignPassManager() signature to allow selection of preferred
...
pass manager type. This allows new FPPassManager to select Call Graph
Pass Manager (if available) as its parent.
llvm-svn: 33306
2007-01-17 20:30:17 +00:00
Devang Patel
d85662f67d
Pass manager may require certain analysis. In such cases, initially
...
pass manager is last user.
llvm-svn: 33273
2007-01-16 22:38:10 +00:00
Devang Patel
3312f75071
Undo last check-in.
...
Remove setupPassManager() and its use.
llvm-svn: 33270
2007-01-16 21:43:18 +00:00
Devang Patel
68dc3d2263
Setup pass manager before scheduling required analysis.
...
llvm-svn: 33262
2007-01-16 19:46:09 +00:00
Devang Patel
4268fc08d3
Code refactoring.
...
llvm-svn: 33245
2007-01-16 02:00:38 +00:00
Devang Patel
6975b6ec09
Remove extra white spaces. Fix comments.
...
llvm-svn: 33244
2007-01-15 23:06:56 +00:00
Devang Patel
39786a90d0
Do not record last users of Pass Manager.
...
llvm-svn: 33243
2007-01-15 20:31:54 +00:00
Devang Patel
f85793d171
s/addPassToManager/add/g
...
llvm-svn: 33138
2007-01-12 20:07:16 +00:00
Devang Patel
e759955c66
Move PMTopLevelManager, PMDataManager and FPPassManger classes into
...
new PassManagers.h header.
This opens door for implementing CGPassManager in IPA library.
llvm-svn: 33135
2007-01-12 18:52:44 +00:00
Devang Patel
0f08004ac0
Remove dead code.
...
llvm-svn: 33121
2007-01-12 17:23:48 +00:00
Devang Patel
ad98d23f16
Start using PMStack. Now each pass is responsibe for assinging
...
a pass manager for itself.
There is some opportunity to remove some dead code from PassManager.cpp.
llvm-svn: 33087
2007-01-11 22:15:30 +00:00
Devang Patel
ac99eca428
Use getPassManagerType() instead of dynamic_cast.
...
llvm-svn: 33078
2007-01-11 19:59:06 +00:00
Devang Patel
3b3f89900e
Add PassManagerType enum.
...
llvm-svn: 33065
2007-01-11 01:10:25 +00:00
Devang Patel
15701b5c0d
Robustify assingPassManager() for Module, Function and Basic Block
...
Passes.
Robustify PMStack.push()
Add dump() routine to print PMStack.
llvm-svn: 33062
2007-01-11 00:19:00 +00:00
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