Commit Graph

102 Commits

Author SHA1 Message Date
Reid Spencer
9133fe2895 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33939 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 23:32:05 +00:00
Chris Lattner
0e5f499638 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32690 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:40:18 +00:00
Chris Lattner
ac0b6ae358 Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 17:46:33 +00:00
Bill Wendling
b742703137 Removed #include <iostream> and replaced with llvm_* streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31923 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-26 09:46:52 +00:00
Chris Lattner
7f8897f22e eliminate RegisterOpt. It does the same thing as RegisterPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:42:52 +00:00
Chris Lattner
0c1262c9f9 Remove unneeded hook. Patch by Anton K. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28664 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 19:11:46 +00:00
Chris Lattner
5180b29cb0 Silence a -pedantic warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28632 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:16:21 +00:00
Chris Lattner
dac58ad983 Make iostream #inclusion explicit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25514 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 23:32:06 +00:00
Chris Lattner
492d4a9d84 Make sure that anything using the ADCE pass pulls in the UnifyFunctionExitNodes
code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23931 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:40:23 +00:00
Chris Lattner
e43702695d preserve calling conventions when hacking on code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22024 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-14 12:25:32 +00:00
Jeff Cohen
9d80930e95 Eliminate tabs and trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 21:38:35 +00:00
Misha Brukman
fd93908ae8 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 23:48:37 +00:00
Chris Lattner
cfa2f8eef4 Remove use of bind_obj
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20276 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 23:22:58 +00:00
Chris Lattner
1a84bd38ef 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20227 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 19:28:49 +00:00
Chris Lattner
6b8efcd697 Change indentation of a whole bunch of code, no real changes here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18843 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 23:49:37 +00:00
Chris Lattner
387bc13575 More substantial simplifications and speedups. This makes ADCE about 20% faster
in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18842 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 23:40:17 +00:00
Chris Lattner
46356794ab More minor microoptimizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18841 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 22:44:30 +00:00
Chris Lattner
4e51ccdd38 Remove some more set operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18840 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 22:22:18 +00:00
Chris Lattner
188839a219 Reduce number of set operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18839 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 22:16:13 +00:00
Chris Lattner
c7ff6c8029 Getting ADCE to interact well with unreachable instructions seems like a nontrivial
exercise that I'm not interested in tackling right now.  Just punt and treat them
like unwind's.

This 'fixes' test/Regression/Transforms/ADCE/unreachable-function.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17106 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-17 23:45:06 +00:00
Chris Lattner
b2f59a2af7 Add note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:09:25 +00:00
Chris Lattner
4b50156049 Prototype these functions more accurately
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:43:15 +00:00
Reid Spencer
2da5c3dda6 Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16368 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 17:06:42 +00:00
Reid Spencer
551ccae044 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/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Chris Lattner
2fc1230dd6 Fixes working towards PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14839 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 01:50:47 +00:00
Chris Lattner
b9110c61fb Do not mark instructions in unreachable sections of the function as live.
This fixes PR332 and ADCE/2004-05-04-UnreachableBlock.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13349 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 17:00:46 +00:00
Chris Lattner
a5f4103931 Simplify code a bit, and fix a bug that was breaking perlbmk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12814 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-10 18:06:21 +00:00
Chris Lattner
562cb66b84 Fix a bug in my checkin last night that was breaking programs using invoke.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12813 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-10 16:53:29 +00:00
Chris Lattner
27c694bacb Fix previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12811 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-10 07:27:48 +00:00
Chris Lattner
17177601fb Correctly update counters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12810 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-10 07:02:02 +00:00
Chris Lattner
ede6ac60a5 Simplify code a bit, and use alias analysis to allow us to delete unused
call and invoke instructions that are known to not write to memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12807 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-10 06:53:09 +00:00
Chris Lattner
e400a0976f Fix the count of the number of instructions removed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11049 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-01 05:15:07 +00:00
Chris Lattner
bd1a90ecc7 Fix ADCE/2003-12-19-MergeReturn.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10539 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-19 09:08:34 +00:00
Chris Lattner
c8ecd22037 Do not crash when deleing a region with a dead invoke instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10161 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-22 02:13:08 +00:00
Chris Lattner
108e4ab159 Minor cleanups and simplifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10127 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 16:52:05 +00:00
Chris Lattner
f8485c6434 Start using the nicer terminator auto-insertion API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10111 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 18:25:24 +00:00
Chris Lattner
faa45ce300 Fix PR116
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10032 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 21:39:27 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
John Criswell
b576c94c15 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:21 +00:00
Misha Brukman
cf00c4ab3b Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:57:28 +00:00
Chris Lattner
02a3be020a Rename Function::getEntryNode -> getEntryBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8625 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:39:18 +00:00
Chris Lattner
c444a4228f Renamed DominatorTree::Node::getNode() -> getBlock()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8469 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 16:26:13 +00:00
Chris Lattner
545a76ced8 Unwind instructions are intrinsically alive, just like returns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8462 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 20:38:14 +00:00
Misha Brukman
ef6a6a69ff The word dependent' has no a'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8030 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 22:14:26 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Chris Lattner
6806f5614d DEBUG got moved to Support/Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7492 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:15:03 +00:00
Chris Lattner
837e42ccef Fix bug: ADCE/2003-06-24-BadSuccessor.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6891 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-24 23:02:45 +00:00
Chris Lattner
99c91e021a Do not mark ALL terminators live if any instruciton in the block is live. We only
want to mark it live if it is an unconditional branch.  This fixes bug:
ADCE/2002-05-28-Crash.ll and makes this pass _much_ more useful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6887 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-24 21:49:45 +00:00
Chris Lattner
34e353e560 Fix bug: ADCE/2003-06-11-InvalidCFG.ll
This was because we were deleting large chunks of functions without an exit block, because the post-dominance
information was not useful.  This broke crafty and twolf.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6698 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 12:10:45 +00:00
Chris Lattner
de579f11ff Remove using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 22:00:07 +00:00