David Greene
7c81589636
Ok, third time's the charm. No changes from last time except the CMake
...
source addition. Apparently the buildbots were wrong about failures.
---
Add some switches helpful for debugging:
-print-before=<Pass Name>
Dump IR before running pass <Pass Name>.
-print-before-all
Dump IR before running each pass.
-print-after-all
Dump IR after running each pass.
These are helpful when tracking down a miscompilation. It is easy to
get IR dumps and do diffs on them, etc.
To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.
llvm-svn: 100249
2010-04-02 23:17:14 +00:00
Evan Cheng
499918dabf
Revert 100204. It broke a bunch of tests and apparently changed what passes are run during codegen.
...
llvm-svn: 100207
2010-04-02 19:29:15 +00:00
David Greene
554373897c
Let's try this again. Re-apply 100143 including an apparent missing
...
<string> include. For some reason the buildbot choked on this while my
builds did not. It's probably due to a difference in system headers.
---
Add some switches helpful for debugging:
-print-before=<Pass Name>
Dump IR before running pass <Pass Name>.
-print-before-all
Dump IR before running each pass.
-print-after-all
Dump IR after running each pass.
These are helpful when tracking down a miscompilation. It is easy to
get IR dumps and do diffs on them, etc.
To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.
llvm-svn: 100204
2010-04-02 18:46:26 +00:00
Eric Christopher
77e4cc4bbd
Revert r100143.
...
llvm-svn: 100146
2010-04-01 22:54:42 +00:00
David Greene
a358be0ef7
Add some switches helpful for debugging:
...
-print-before=<Pass Name>
Dump IR before running pass <Pass Name>.
-print-before-all
Dump IR before running each pass.
-print-after-all
Dump IR after running each pass.
These are helpful when tracking down a miscompilation. It is easy to
get IR dumps and do diffs on them, etc.
To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.
llvm-svn: 100143
2010-04-01 22:43:57 +00:00
Eric Christopher
88fe6775de
Fix a few unused parameter warnings.
...
llvm-svn: 96533
2010-02-17 23:55:26 +00:00
Chris Lattner
2a0d9140f5
doxygenize some comments, patch by Peter Collingbourne!
...
llvm-svn: 96018
2010-02-12 21:54:28 +00:00
Chris Lattner
c07d7f41e3
elimiante the dynamic_cast's from opt.
...
llvm-svn: 94160
2010-01-22 06:03:06 +00:00
Chris Lattner
1bd9c3ec88
eliminate a bunch of dynamic_cast's.
...
llvm-svn: 94155
2010-01-22 05:24:46 +00:00
Chris Lattner
997ad42b6d
eliminate a bunch of dynamic_cast's.
...
llvm-svn: 94154
2010-01-22 04:55:08 +00:00
Chris Lattner
56e3aa006f
add some new methods to adjust this pointers. Not used yet.
...
llvm-svn: 94013
2010-01-20 19:26:14 +00:00
Dan Gohman
d16b19ff3e
Move several function bodies which are rarely inlined out of line.
...
llvm-svn: 91319
2009-12-14 19:43:09 +00:00
Daniel Dunbar
4daaf9d3f4
Pass StringRef by value.
...
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
Chandler Carruth
766362c707
Move DataTypes.h to include/llvm/System, update all users. This breaks the last
...
direct inclusion edge from System to Support.
llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Eric Christopher
a7407c0921
Remove a bunch of unused arguments from functions, silencing a
...
warning.
llvm-svn: 84130
2009-10-14 20:28:33 +00:00
Dan Gohman
68e044e81a
Add a form of addPreserved which takes a string argument, to allow passes
...
to declare that they preserve other passes without needing to pull in
additional header file or library dependencies. Convert MachineFunctionPass
and CodeGenLICM to make use of this.
llvm-svn: 83555
2009-10-08 17:00:02 +00:00
Dan Gohman
f6fbd474ed
Fix a typo in a comment.
...
llvm-svn: 80697
2009-09-01 18:29:01 +00:00
Chris Lattner
1c0452caeb
Change Pass::print to take a raw ostream instead of std::ostream,
...
update all code that this affects.
llvm-svn: 79830
2009-08-23 06:03:38 +00:00
Dan Gohman
24939b2c4f
Tidy #includes.
...
llvm-svn: 78677
2009-08-11 16:02:12 +00:00
Daniel Dunbar
9bbadad09d
Fix some comments referring to std::cerr.
...
llvm-svn: 77931
2009-08-03 01:02:24 +00:00
Owen Anderson
cc287b28c9
Get rid of the Pass+Context magic.
...
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Owen Anderson
121f736d9c
"LLVMContext* " --> "LLVMContext *"
...
llvm-svn: 74878
2009-07-06 23:00:19 +00:00
Owen Anderson
b0d428b228
Make the current LLVMContext available to passes.
...
llvm-svn: 74724
2009-07-02 20:23:41 +00:00
Devang Patel
e182bc0c48
Remove dead code.
...
llvm-svn: 68246
2009-04-01 21:27:08 +00:00
Duncan Sands
aee16d4916
Rename getAnalysisToUpdate to getAnalysisIfAvailable.
...
llvm-svn: 63198
2009-01-28 13:14:17 +00:00
Dan Gohman
8271066844
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Misha Brukman
2d4b2dd2d3
* Alphabetized system headers per the style guide
...
* Minor spacing and comment cleanups
llvm-svn: 61590
2009-01-02 20:26:30 +00:00
Torok Edwin
e45fc8e8ce
Add an assert to catch user errors like:
...
MyFunctionPass() : FunctionPass(ID) {}
when the user actually meant to write:
MyFunctionPass() : FunctionPass(&ID) {}
llvm-svn: 58518
2008-10-31 17:27:41 +00:00
Devang Patel
1e1f4a0bdd
Add dom info verifier.
...
llvm-svn: 52967
2008-07-01 17:44:24 +00:00
Bill Wendling
1866fa680f
Remove warnings about unused parameters and shadowed variables.
...
llvm-svn: 51266
2008-05-19 20:15:12 +00:00
Dan Gohman
ffe0b1f40e
Whitespace cleanups.
...
llvm-svn: 51089
2008-05-14 00:43:10 +00:00
Dan Gohman
a363ba510c
Don't include <map> in Pass.h, which doesn't need it. This requires
...
adding <map> to many files that actually do need it.
llvm-svn: 48667
2008-03-21 23:51:57 +00:00
Devang Patel
5e8cbbea65
PassInfo keep tracks whether a pass is an analysis pass or not.
...
llvm-svn: 48554
2008-03-19 21:56:59 +00:00
Devang Patel
38f181fa8c
Do not use virtual function to identify an analysis pass.
...
llvm-svn: 48520
2008-03-19 00:48:41 +00:00
Devang Patel
811ca3ddba
Identify Analysis pass.
...
Do not run analysis pass again if analysis info is still available.
This fixes PR1441.
llvm-svn: 48476
2008-03-18 00:39:19 +00:00
Dan Gohman
37a26f973f
Update comments; getPassName no longer uses RTTI.
...
llvm-svn: 48369
2008-03-14 18:27:04 +00:00
Dan Gohman
9ca724cee0
Move the PMStack class out of Pass.h and into PassManagers.h.
...
llvm-svn: 48367
2008-03-14 18:14:29 +00:00
Dan Gohman
70f4b55e3f
Change PMStack::push to accept a PMDataManager* instead of
...
a Pass*. PMDataManager* is what it actually holds, so this
makes it clearer.
llvm-svn: 48314
2008-03-13 01:21:31 +00:00
Dan Gohman
6c18f26790
Fix a typo in a comment.
...
llvm-svn: 48313
2008-03-13 01:08:50 +00:00
Dan Gohman
339b887ff6
No need for typedefs with enums in C++.
...
llvm-svn: 48312
2008-03-13 01:07:53 +00:00
Dan Gohman
8ff072e188
Remove unused runPass methods.
...
llvm-svn: 48044
2008-03-08 01:43:56 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Chris Lattner
48e389b33a
Allow passes to just pass up "FunctionPass(&ID)" instead of "FunctionPass((intptr_t)&ID)"
...
llvm-svn: 42741
2007-10-08 03:45:44 +00:00
Anton Korobeynikov
1f11738913
Include DataTypes.h to provide intptr_t type. This fixes OpenBSD compilation of this file.
...
Inspired by Laurence Tratt's patch
llvm-svn: 42695
2007-10-06 13:07:11 +00:00
Reid Spencer
8c5c7c8453
Change casts from old style to new style. This helps document the details
...
better, gives the compiler a chance to validate the cast and reduces warnings
if the user turns on -Wold-style-cast option.
llvm-svn: 41033
2007-08-12 08:12:35 +00:00
Dan Gohman
53bb686577
Make ImmutablePass::runOnModule non-virtual, since it is not
...
intended to be overridden.
llvm-svn: 40671
2007-08-01 14:28:20 +00:00
Devang Patel
45675e56ad
Verify loop info.
...
llvm-svn: 40062
2007-07-19 18:02:32 +00:00
Devang Patel
9c100bc7e9
Set up ground work to verify preserved analysis info.
...
llvm-svn: 40039
2007-07-19 05:36:09 +00:00
Devang Patel
f1b6294e80
Fix memory leak.
...
llvm-svn: 38469
2007-07-09 20:52:39 +00:00
Dan Gohman
19d23d8595
Remove forward-declarations for classes that don't exist.
...
llvm-svn: 36993
2007-05-11 21:05:57 +00:00