Nadav Rotem
bd2b55bc74
Clean whitespaces.
...
llvm-svn: 160668
2012-07-24 10:51:42 +00:00
Bill Wendling
31d80032c6
The landingpad instruction isn't dead simply because it's value isn't used.
...
llvm-svn: 138102
2011-08-19 21:52:06 +00:00
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
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
Dan Gohman
74d5144414
Use pre-increment instead of post-increment when the result is not used.
...
llvm-svn: 106542
2010-06-22 15:08:57 +00:00
Dan Gohman
e4a22bdd4a
Use do+while instead of while for loops which obviously have a
...
non-zero trip count. Use SmallVector's pop_back_val().
llvm-svn: 92734
2010-01-05 16:27:25 +00:00
Chris Lattner
5f54c5bd1c
eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861
...
llvm-svn: 80766
2009-09-02 06:11:42 +00:00
Duncan Sands
880eaf5278
Allow readonly functions to unwind exceptions. Teach
...
the optimizers about this. For example, a readonly
function with no uses cannot be removed unless it is
also marked nounwind.
llvm-svn: 71071
2009-05-06 06:49:50 +00:00
Dale Johannesen
448293322b
Re-commit 65975 and a fix for the problem that
...
was causing llvm-gcc to fail to build. I've
verified it bootstraps now; good enough for me.
llvm-svn: 66073
2009-03-04 21:24:04 +00:00
Devang Patel
79a342d7d3
Let instcombiner remove redundant dbg intrinsics.
...
llvm-svn: 59658
2008-11-19 18:59:41 +00:00
Devang Patel
fbb29cdaee
Cleanup debug info. assocated with deleted instructions.
...
llvm-svn: 59012
2008-11-11 00:54:10 +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
Owen Anderson
1acfb69ad7
Remove the ability for ADCE to remove unreachable blocks in loop nests, because, as Eli pointed out, SimplifyCFG already does this.
...
llvm-svn: 53104
2008-07-03 17:21:41 +00:00
Owen Anderson
9a7d657786
Use df_ext_iterator to capture the reachable set without allocating an extra set.
...
Also, move large sets and vectors out of instance variables and onto the stack,
and give them more reasonable sizes.
llvm-svn: 53044
2008-07-02 18:41:09 +00:00
Owen Anderson
e20158affb
Add support to ADCE for pruning unreachable blocks. This addresses the final
...
part of PR2509.
llvm-svn: 53038
2008-07-02 18:05:19 +00:00
Owen Anderson
764fe3df94
Use DenseSet rather than SmallPtrSet for the alive set. Using SmallPtrSet
...
with a huge "size" parameter is actually quite inefficient.
llvm-svn: 53034
2008-07-02 17:32:04 +00:00
Owen Anderson
7d4e8f976c
At Chris' suggestion, move the liveness and worklist datastructures into
...
instance variables so they can be allocated just once, and reuse the worklist
as the dead list as well.
llvm-svn: 52618
2008-06-23 06:13:12 +00:00
Duncan Sands
18fb7b1fa3
Add a newline at the end of this file.
...
llvm-svn: 51680
2008-05-29 14:38:23 +00:00
Owen Anderson
bd3940abc7
Replace the old ADCE implementation with a new one that more simply solves
...
the one case that ADCE catches that normal DCE doesn't: non-induction variable
loop computations.
This implementation handles this problem without using postdominators.
llvm-svn: 51668
2008-05-29 08:45:13 +00:00
Owen Anderson
6fbcec4778
Remove ADCE's ability to delete loops. This ability is now implemented in a
...
safer manner by loop deletion.
llvm-svn: 51182
2008-05-16 04:34:51 +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
Gabor Greif
6c6b8a57f3
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +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
Duncan Sands
14f11d6836
Integrate the readonly/readnone logic more deeply
...
into alias analysis. This meant updating the API
which now has versions of the getModRefBehavior,
doesNotAccessMemory and onlyReadsMemory methods
which take a callsite parameter. These should be
used unless the callsite is not known, since in
general they can do a better job than the versions
that take a function. Also, users should no longer
call the version of getModRefBehavior that takes
both a function and a callsite. To reduce the
chance of misuse it is now protected.
llvm-svn: 44487
2007-12-01 07:51:45 +00:00
Duncan Sands
6ec98952e0
Readonly/readnone functions are allowed to throw
...
exceptions, so don't turn invokes of them into
calls.
llvm-svn: 44278
2007-11-22 21:40:06 +00:00
David Greene
f06a395bb9
New CallInst interface to address GLIBCXX_DEBUG errors caused by
...
indexing an empty std::vector.
Updates to all clients.
llvm-svn: 40660
2007-08-01 03:43:44 +00:00
Devang Patel
2ef6caf14f
s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
...
llvm-svn: 37407
2007-06-04 00:32:22 +00:00
Devang Patel
d58b82f83a
s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
...
llvm-svn: 37403
2007-06-03 06:26:14 +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
Owen Anderson
16d1fd6ec8
Revert changes that caused breakage.
...
llvm-svn: 36255
2007-04-18 06:46:57 +00:00
Owen Anderson
c07f29d206
Use ETForest instead of DominatorTree.
...
llvm-svn: 36249
2007-04-18 04:55:33 +00:00
Chris Lattner
ce2cc6e404
Eliminate use of ctors that take vectors.
...
llvm-svn: 34219
2007-02-13 02:10:56 +00:00
Chris Lattner
b131b3e07e
Simplify code by using value::takename
...
llvm-svn: 34176
2007-02-11 01:23:03 +00:00
Reid Spencer
8749d297f5
Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
...
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.
llvm-svn: 33939
2007-02-05 23:32:05 +00:00
Chris Lattner
9e7640cf02
Switch over Transforms/Scalar to use the STATISTIC macro. For each statistic
...
converted, we lose a static initializer. This also allows GCC to emit warnings
about unused statistics.
llvm-svn: 32690
2006-12-19 21:40:18 +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
1b3a86000a
Removed #include <iostream> and replaced with llvm_* streams.
...
llvm-svn: 31923
2006-11-26 09:46:52 +00:00
Chris Lattner
a39dcb5377
eliminate RegisterOpt. It does the same thing as RegisterPass.
...
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
6cca762d5f
Remove unneeded hook. Patch by Anton K. Thanks!
...
llvm-svn: 28664
2006-06-02 19:11:46 +00:00
Chris Lattner
339d8b5ba9
Silence a -pedantic warning.
...
llvm-svn: 28632
2006-06-01 17:16:21 +00:00
Chris Lattner
2588f0eb8f
Make iostream #inclusion explicit
...
llvm-svn: 25514
2006-01-22 23:32:06 +00:00
Chris Lattner
46cc930a67
Make sure that anything using the ADCE pass pulls in the UnifyFunctionExitNodes
...
code
llvm-svn: 23931
2005-10-24 01:40:23 +00:00
Chris Lattner
7771ae3fcc
preserve calling conventions when hacking on code
...
llvm-svn: 22024
2005-05-14 12:25:32 +00:00