Commit Graph

25 Commits

Author SHA1 Message Date
Anton Korobeynikov
43d1fd449f For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51687 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-29 17:41:17 +00:00
Gabor Greif
1b9e1672fb Make Use::init() private, it breaks invariants, clients should assign or use set().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-27 21:29:38 +00:00
Gabor Greif
94fb68ba21 Merge of r51073-51074 from use-diet branch.
Do not rely on std::swap<Use>, provide a (faster) member function instead.
This change is primarily necessitated by MSVC++'s incompatibility with
declaring std::swap<Use> to be a friend of Use.

Also contains some minor tweaks to Use inline functions,
to undo pointless changes that sneaked in with the last merge.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51078 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 22:51:52 +00:00
Gabor Greif
efe65369a7 merge of use-diet branch to trunk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50943 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-10 08:32:32 +00:00
Dan Gohman
7e4d5b6002 Fix a copy+paste error in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49820 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 21:57:29 +00:00
Torok Edwin
f4290266e9 test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48984 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 17:09:58 +00:00
Dan Gohman
950a4c40b8 Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48801 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:06:05 +00:00
Gabor Greif
59dc98de2f move the Use destructor where it belongs to
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48376 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 22:03:02 +00:00
Chris Lattner
7ed47a1335 Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 19:59:42 +00:00
Chris Lattner
3ef437d137 Add a new use_iterator::atEnd() method, which allows us to shrink
pred_iterator down to a single ivar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42859 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-11 04:18:11 +00:00
Chris Lattner
023cfb6871 Move the definition of value_use_iterator::getOperandNo to User.h where the
definition of the User class is available, this fixes the  build with some
compiler versions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28163 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-08 05:59:36 +00:00
Chris Lattner
71fe0f4a43 Add a helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28114 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-05 00:51:42 +00:00
Chris Lattner
5dc8050ca3 Add some missing template specializations for autodereferencing User.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27189 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-27 22:49:07 +00:00
Misha Brukman
9769ab2226 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:19:05 +00:00
Chris Lattner
a266197489 Switch from using an ilist for uses to using a custom doubly linked list.
This list does not provide the ability to go backwards in the list (its
more of an unordered collection, stored in the shape of a list).

This change means that use iterators are now only forward iterators, not
bidirectional.

This improves the memory usage of use lists from '5 + 4*#use' per value to
'1 + 4*#use'.  While it would be better to reduce the multiplied factor,
I'm not smart enough to do so.  This list also has slightly more efficient
operators for manipulating list nodes (a few less loads/stores), due to not
needing to be able to iterate backwards through the list.

This change reduces the memory footprint required to hold 176.gcc from
66.025M -> 57.687M, a 14% reduction.  It also speeds up the compiler,
7.73% in the case of bytecode loading alone (release build loading 176.gcc).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19956 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 01:22:06 +00:00
Chris Lattner
bca81448ac Improve conformance with the Misha spelling benchmark suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19930 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-30 00:09:23 +00:00
Chris Lattner
02accaeb17 Adjust to ilist changes.
Based on the ilist changes avoid allocating an entire Use object for the
end of the Use chain.  This saves 8 bytes of memory for each Value allocated
in the program.  For 176.gcc, this reduces us from 69.5M -> 66.0M, a 5.3%
memory savings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19925 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 18:43:28 +00:00
Chris Lattner
b8d5b1211f Adjust to User.h changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19884 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:30:52 +00:00
Chris Lattner
1fca5ff62b Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 16:14:51 +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
8b70b78ba4 Fixes for PR114: Thanks to Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 20:21:15 +00:00
Chris Lattner
60e9742e82 This is obviously illegal C++ code, but was apparently accepted by 3.3
bork


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9993 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-14 06:03:05 +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
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Chris Lattner
202884fd9b Completely rewrite support for the Value::use_* list. Now, all operations on
this list (except use_size()) are constant time.  Before the killUse method
(used whenever something stopped using a value) was linear time, and thus
very very slow for large programs.

This speeds GCCAS up _substantially_ on large programs: almost 2x for 176.gcc:

176.gcc:     77.07s -> 37.38s
177.mesa:     7.59s ->  5.57s
252.eon:     21.02s -> 19.52s (*)
253.perlbmk: 11.40s -> 13.05s
254.gap:      7.25s -> 7.42s

252.eon would speed up a whole lot more, but optimization time is being
dominated by the inlining pass, which needs to be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9159 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 16:53:04 +00:00