Owen Anderson
46990c17f7
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
...
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820
2010-10-19 17:21:58 +00:00
Owen Anderson
69cbf2e8b7
Now with fewer extraneous semicolons!
...
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Argyrios Kyrtzidis
75b69c1de3
Revert r111082. No warnings for this common pattern.
...
llvm-svn: 111102
2010-08-15 10:27:23 +00:00
Argyrios Kyrtzidis
70b248e3ac
Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.
...
llvm-svn: 111082
2010-08-14 21:35:10 +00:00
Owen Anderson
f2fea95f2f
Reapply r110396, with fixes to appease the Linux buildbot gods.
...
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
aadd8a89ca
Revert r110396 to fix buildbots.
...
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
b9762c07cb
Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
...
ID member as the sole unique type identifier. Clean up APIs related to this change.
llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Owen Anderson
f8addbb0a1
Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
...
llvm-svn: 109045
2010-07-21 22:09:45 +00:00
David Greene
c0eced92e3
Change dbgs() back to errs() as Chris requested.
...
llvm-svn: 92086
2009-12-23 23:29:28 +00:00
David Greene
1c88ae8f15
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92039
2009-12-23 20:34:27 +00:00
Victor Hernandez
673c036bc7
Remove FreeInst.
...
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.
llvm-svn: 85176
2009-10-26 23:43:48 +00:00
Nick Lewycky
2b8400628d
Remove includes of Support/Compiler.h that are no longer needed after the
...
VISIBILITY_HIDDEN removal.
llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky
711c726c97
Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
...
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.
llvm-svn: 85042
2009-10-25 06:33:48 +00:00
Victor Hernandez
a25a2890fa
Remove MallocInst from LLVM Instructions.
...
llvm-svn: 84299
2009-10-17 01:18:07 +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
Chris Lattner
01dae858b6
eliminate the "Value" printing methods that print to a std::ostream.
...
This required converting a bunch of stuff off DOUT and other cleanups.
llvm-svn: 79819
2009-08-23 04:37:46 +00:00
Torok Edwin
f955a6ef49
llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
...
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").
llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Torok Edwin
9b41a5faf2
Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
...
and abort()/exit() -> llvm_report_error().
llvm-svn: 75363
2009-07-11 13:10:19 +00:00
Dan Gohman
ee407d25ca
Remove some unnecessary #includes.
...
llvm-svn: 72948
2009-06-05 16:32:58 +00:00
Dan Gohman
e1f9be27bc
Tidy up several unbeseeming casts from pointer to intptr_t.
...
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Dan Gohman
bab18cae46
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Devang Patel
f15fe34521
Restore isCFGOnly property of various analysis passes.
...
llvm-svn: 48579
2008-03-20 02:25:21 +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
Chris Lattner
ad9a6ccb83
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Nick Lewycky
c2306ff5b4
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
cd45427a87
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162
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
38a66bc82e
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Reid Spencer
598f6d293b
Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduce
...
LLVM's footprint and speed up linking.
llvm-svn: 33941
2007-02-05 23:42:17 +00:00
Chris Lattner
03b59d4218
eliminate static ctors from Statistics
...
llvm-svn: 32697
2006-12-19 22:30:33 +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
Chris Lattner
a531ce882e
Detemplatize the Statistic class. The only type it is instantiated with
...
is 'unsigned'.
llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Bill Wendling
040a60d22d
Removed some of the iostream #includes. Moved towards converting to using
...
llvm streams
llvm-svn: 31983
2006-11-28 22:46:12 +00:00
Chris Lattner
f530302eda
Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.
...
llvm-svn: 29921
2006-08-27 22:30:17 +00:00
Chris Lattner
15ec384b49
Add explicit iostream #includes
...
llvm-svn: 25513
2006-01-22 23:19:18 +00:00
Chris Lattner
17f407da37
expose a ctor
...
llvm-svn: 23924
2005-10-24 01:00:45 +00:00
Misha Brukman
122d682689
Remove trailing whitespace
...
llvm-svn: 21416
2005-04-21 21:13:18 +00:00
Chris Lattner
f975e2350a
Directly count the number of memory instructions.
...
llvm-svn: 20766
2005-03-22 03:55:10 +00:00
Reid Spencer
cdc0b6d962
Standardize on 'class' instead of 'struct'. Gets rid of warnings in VC++
...
Patch contributed by Jeff Cohen.
llvm-svn: 17889
2004-11-16 06:58:55 +00:00
Chris Lattner
dd0094e4ed
Convert 'struct' to 'class' in various places to adhere to the coding standards
...
and work better with VC++. Patch contributed by Morten Ofstad!
llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Reid Spencer
c4abcbefb1
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
6f0cabcb53
There is no reason for this to be a pass!
...
llvm-svn: 8214
2003-08-29 14:43:17 +00:00
Chris Lattner
5f4d7d2801
Add total instruction, bb, & function counts
...
llvm-svn: 4954
2002-12-07 23:24:24 +00:00
Chris Lattner
18b9a192e1
Simplify code
...
llvm-svn: 4886
2002-12-03 19:40:16 +00:00
Chris Lattner
acfc11664a
Count CallInsts correctly, remove unneccesary initializers
...
S: ----------------------------------------------------------------------
llvm-svn: 4721
2002-11-17 22:15:40 +00:00
Dinakar Dhurjati
9da9f0534e
Gives the count for various instructions.
...
llvm-svn: 4706
2002-11-13 18:22:13 +00:00