1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

135 Commits

Author SHA1 Message Date
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
Jeff Cohen
6c42217055 Eliminate tabs and trailing spaces
llvm-svn: 21480
2005-04-23 21:38:35 +00:00
Misha Brukman
53e199440e Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
b5256c157d Remove use of bind_obj
llvm-svn: 20276
2005-02-22 23:22:58 +00:00
Chris Lattner
29126b65c4 Do not mark obviously unreachable blocks live when processing PHI nodes,
and handle incomplete control dependences correctly.  This fixes:

Regression/Transforms/ADCE/dead-phi-edge.ll
  -> a missed optimization

Regression/Transforms/ADCE/dead-phi-edge.ll
  -> a compiler crash distilled from QT4

llvm-svn: 20227
2005-02-17 19:28:49 +00:00
Chris Lattner
bc889ab3c7 Change indentation of a whole bunch of code, no real changes here.
llvm-svn: 18843
2004-12-12 23:49:37 +00:00
Chris Lattner
85776b0e99 More substantial simplifications and speedups. This makes ADCE about 20% faster
in some cases.

llvm-svn: 18842
2004-12-12 23:40:17 +00:00
Chris Lattner
deda69d473 More minor microoptimizations
llvm-svn: 18841
2004-12-12 22:44:30 +00:00