Owen Anderson
6c18d1aac0
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
df7a4f2515
Now with fewer extraneous semicolons!
...
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Owen Anderson
5e19bfcde3
Move the pass initialization helper functions into the llvm namespace, and add
...
a header declaring them all. This is also where we will declare per-library pass-set
initializer functions down the road.
llvm-svn: 115900
2010-10-07 04:13:08 +00:00
Owen Anderson
d31d82d75c
Now that PassInfo and Pass::ID have been separated, move the rest of the passes over to the new registration API.
...
llvm-svn: 111815
2010-08-23 17:52:01 +00:00
Owen Anderson
a7aed18624
Reapply r110396, with fixes to appease the Linux buildbot gods.
...
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
bda59bd247
Revert r110396 to fix buildbots.
...
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
755aceb5d0
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
Benjamin Kramer
ccce8bae14
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
...
llvm-svn: 92726
2010-01-05 13:12:22 +00:00
Dan Gohman
511d2e26dd
Change instnamer to name arguments "arg" instead of "tmp" for clarity, and
...
to name basic blocks "bb" instead of "BB", for consistency.
llvm-svn: 84502
2009-10-19 14:47:32 +00:00
Owen Anderson
55f1c09e31
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Chris Lattner
c1c6404bba
make instnamer name unnamed blocks as well as instructions and args.
...
llvm-svn: 61175
2008-12-18 00:33:11 +00:00
Devang Patel
38642e598e
Don't forget arguments!
...
llvm-svn: 59745
2008-11-20 19:50:17 +00:00
Devang Patel
5a5ab730e0
InstructionNamer preserves everything.
...
llvm-svn: 58787
2008-11-06 01:00:16 +00:00
Torok Edwin
ca97b42ef7
export an ID for the instructionNamer, allowing analysis/transformation passes
...
that need it to require it by ID.
llvm-svn: 58238
2008-10-27 10:16:27 +00:00
Chris Lattner
20abc419e5
Add a new trivial -inst-namer pass which makes it possible to diff the
...
before/after effects of a pass, crazy!
llvm-svn: 55230
2008-08-23 06:07:02 +00:00