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

2666 Commits

Author SHA1 Message Date
Chris Lattner
7636e86e7e Add some iterators that should have come in long ago
llvm-svn: 20085
2005-02-09 03:14:29 +00:00
Chris Lattner
a378bec169 Hopefully fix the build on Darwin with GCC 3.3
llvm-svn: 20064
2005-02-07 16:09:01 +00:00
Chris Lattner
9b289130f7 Eliminate the explicit opcode field in ConstantExpr, using the SubclassData
field to hold it instead.  This shrinks memory usage for 176.gcc from
57628728 to 57598144 bytes, a small reduction of about 30K.

llvm-svn: 20047
2005-02-05 02:00:12 +00:00
Chris Lattner
7eb45f89a5 Eliminate the explicit volatile fields in LoadInst and StoreInst. This shrinks
LoadInst from 60 -> 56 bytes and StoreInst from 76 -> 72 bytes.

Note however, that this doesn't actually save any memory on common systems
where 'malloc' returns 8-byte aligned memory, as the saved space is replaced
by useless alignment padding.  :(

llvm-svn: 20046
2005-02-05 01:44:18 +00:00
Chris Lattner
de2bf4ed11 SubclassID is really a small field. Split it into half and let subclasses
play with the unused part.

llvm-svn: 20043
2005-02-05 01:37:44 +00:00
Chris Lattner
0febe1ed81 Add some new members
llvm-svn: 20034
2005-02-04 19:58:06 +00:00
Chris Lattner
820991042d add new member
llvm-svn: 20033
2005-02-04 19:57:57 +00:00
Chris Lattner
22eb2f789e Add a new method.
llvm-svn: 20017
2005-02-03 18:40:05 +00:00
Chris Lattner
3757dc8600 remove dead method
llvm-svn: 19977
2005-02-01 21:37:06 +00:00
Chris Lattner
fdbedbbb45 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).

llvm-svn: 19956
2005-02-01 01:22:06 +00:00
Chris Lattner
ee6bc42f3e * Make some methods more const correct.
* Change the FunctionCalls and AuxFunctionCalls vectors into std::lists.
  This makes many operations on these lists much more natural, and avoids
  *exteremely* expensive copying of DSCallSites (e.g. moving nodes around
  between lists, erasing a node from not the end of the vector, etc).

With a profile build of analyze, this speeds up BU DS from 25.14s to
12.59s on 176.gcc.  I expect that it would help TD even more, but I don't
have data for it.

This effectively eliminates removeIdenticalCalls and children from the
profile, going from 6.53 to 0.27s.

llvm-svn: 19939
2005-01-30 23:51:02 +00:00
Chris Lattner
92b24431d9 Improve spelling
llvm-svn: 19931
2005-01-30 00:13:34 +00:00
Chris Lattner
382abe80a0 Improve conformance with the Misha spelling benchmark suite
llvm-svn: 19930
2005-01-30 00:09:23 +00:00
Chris Lattner
e9c443b500 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.

llvm-svn: 19925
2005-01-29 18:43:28 +00:00
Chris Lattner
aa4ae8f5b3 Adjust to ilist changes.
llvm-svn: 19923
2005-01-29 18:41:12 +00:00
Chris Lattner
1367f39eb9 Adjust to changes in ilist
llvm-svn: 19922
2005-01-29 18:41:00 +00:00
Chris Lattner
3a8cb1178e Rename createNode -> createSentinal.
Add a new method, destroySentinal, that is used to delete it (instead of
requiring use of delete.

llvm-svn: 19921
2005-01-29 18:40:19 +00:00
Chris Lattner
3f035ee52d There is no reason to include ostream here, include iosfwd instead.
This file was schizophrenic when it came to representing sizes.  In some
cases it represented them as 'unsigneds', which are not enough for 64-bit
hosts.  In other cases, it represented them as uint64_t's, which are
inefficient for 32-bit hosts.

This patch unifies all of the sizes to use size_t instead.

llvm-svn: 19917
2005-01-29 17:16:07 +00:00
Chris Lattner
41114c90af Fix quotes.
llvm-svn: 19909
2005-01-29 06:29:45 +00:00
Jeff Cohen
8d28a62773 Unbreak VC++ build
llvm-svn: 19908
2005-01-29 06:27:16 +00:00
Chris Lattner
3b3e7f7cc2 Memory used is a delta between memuse at the start of the time and the
memuse at the end, thus it is signed.

llvm-svn: 19904
2005-01-29 05:21:16 +00:00
Chris Lattner
d8266ae3dd Adjust to changes in the User class.
llvm-svn: 19888
2005-01-29 00:33:00 +00:00
Chris Lattner
941fce0bb5 Adjust to changes in the User class. Introduce a new UnaryInstruction
class.

llvm-svn: 19887
2005-01-29 00:32:51 +00:00
Chris Lattner
1567599aae Adjust to user changes.
llvm-svn: 19886
2005-01-29 00:32:00 +00:00
Chris Lattner
6e2367383d Many changes to cope with the User.h changes. Instructions now generally
directly embed their operands.

llvm-svn: 19885
2005-01-29 00:31:36 +00:00
Chris Lattner
91422cffe4 Adjust to User.h changes.
llvm-svn: 19884
2005-01-29 00:30:52 +00:00
Chris Lattner
c6c1106909 Instead of storing operands as std::vector<Use>, just maintain a pointer
and num operands in the User class.  this allows us to embed the operands
directly in the subclasses if possible.  For example, for binary operators
we store the two operands in the derived class.

The has several effects:
  1. it improves locality because the operands and instruction are together
  2. it makes accesses to operands faster (one less load) if you access them
     through the derived class pointer.  For example this:

Value *GetBinaryOperatorOp(BinaryOperator *I, int i) {
  return I->getOperand(i);
}

Was compiled to:

_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
        movl    4(%esp), %edx
        movl    8(%esp), %eax
        sall    $4, %eax
        movl    24(%edx), %ecx
        addl    %ecx, %eax
        movl    (%eax), %eax
        ret

and is now compiled to:

_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
        movl    8(%esp), %eax
        movl    4(%esp), %edx
        sall    $4, %eax
        addl    %edx, %eax
        movl    44(%eax), %eax
        ret

Accesses through "Instruction*" are unmodified.

   3. This reduces memory consumption (by about 3%) by eliminating 1 word of
      vector overhead and a malloc header on a seperate object.
   4. This speeds up gccas about 10% (both debug and release builds) on
      large things (such as 176.gcc).  For example, it takes a debug build
      from 172.9 -> 155.6s and a release gccas from 67.7 -> 61.8s

llvm-svn: 19883
2005-01-29 00:29:39 +00:00
Chris Lattner
a7ce993d7f Do not clean up if the MappedFile was never used or if the client already
closed the file.  This unbreaks the build.

llvm-svn: 19871
2005-01-28 16:08:23 +00:00
Jeff Cohen
29092b4f26 Get VC++ compiling again
llvm-svn: 19869
2005-01-28 07:29:32 +00:00
Reid Spencer
dab05f06a4 Convert some old C-style casts to C++ style.
llvm-svn: 19868
2005-01-28 07:22:20 +00:00
Chris Lattner
d009d52fe5 Add some methods.
llvm-svn: 19817
2005-01-24 19:55:34 +00:00
Misha Brukman
b2961bf931 primitive' has no a'
llvm-svn: 19808
2005-01-24 16:28:03 +00:00
Chris Lattner
b7a64c49f0 Do not return true from isSized for things without a size (like functions and
labels) even though they are concrete.  This fixes the DSA regressions from
last night.

llvm-svn: 19807
2005-01-24 16:00:52 +00:00
Chris Lattner
766ad3378c This giant patch speeds up Type::isSized(). Before, this would have to search
large nested types over and over again to determine if they are sized or not.
Now, isSized() is able to make snap decisions about all concrete types, which
are a common occurance (and includes all primitives).

On 177.mesa, this speeds up DSE from 39.5s -> 21.3s and GCSE from
13.2s -> 11.3s, reducing gccas time from 80s -> 61s (this is a debug build).

DSE and GCSE are still too slow on this testcase, but this is a simple
improvement.

llvm-svn: 19800
2005-01-24 02:08:34 +00:00
Chris Lattner
65c4c91477 Add an accessor.
llvm-svn: 19794
2005-01-23 22:57:27 +00:00
Chris Lattner
38249d15df Expose more information from register allocation to passes that run after
it.

llvm-svn: 19788
2005-01-23 22:13:36 +00:00
Chris Lattner
519fcf19c2 Give SelectionDAG a TargetLowering instance instead of TM instance.
llvm-svn: 19778
2005-01-23 04:36:06 +00:00
Chris Lattner
18d4178fe6 Remove two dead methods and improve the comments for DiffFilesWithTolerance.
Also, make DiffFilesWithTolerance take sys::Path objects instead of std::strings.

llvm-svn: 19770
2005-01-23 03:30:39 +00:00
Chris Lattner
236f3c69b8 New method.
llvm-svn: 19765
2005-01-23 03:11:38 +00:00
Jeff Cohen
43692e25e9 Fix VC++ complaint
llvm-svn: 19747
2005-01-22 16:30:58 +00:00
Chris Lattner
9ee3bbc844 Keep track of node depth for each node
llvm-svn: 19732
2005-01-21 21:39:38 +00:00
Chris Lattner
bd8da4c80e Apparently destroyFile() now throws an exception. Since this class is
designed to be put on the stack, that's not cool.  Catch and ignore the
exception.

llvm-svn: 19723
2005-01-20 23:31:35 +00:00
Chris Lattner
8e17ad37f2 Eliminate the unimplemented ADDC/SUBB operations, add ADD_PARTS/SUB_PARTS instead.
llvm-svn: 19713
2005-01-20 18:50:39 +00:00
Chris Lattner
7005632b59 Add an accessor for targets that pass args in regs
llvm-svn: 19702
2005-01-19 20:19:58 +00:00
Chris Lattner
2a03fa3a5c Add a new method, described in the comment.
llvm-svn: 19683
2005-01-19 06:53:02 +00:00
Jeff Cohen
a3414ac8c7 Add missing data types for VC++
llvm-svn: 19680
2005-01-19 05:08:31 +00:00
Chris Lattner
4938a7c8a1 Move all data members to the end of the class.
Add a hook to find out how the target handles shift amounts that are out of
range.  Either they are undefined (the default), they mask the shift amount
to the size of the register (X86, Alpha, etc), or they extend the shift (PPC).

This defaults to undefined, which is conservatively correct.

llvm-svn: 19676
2005-01-19 03:36:03 +00:00
Chris Lattner
0697def39d Keep track of the returned value type as well.
llvm-svn: 19669
2005-01-18 19:26:18 +00:00
Chris Lattner
818e819e43 Allow setcc operations to have non-bool types.
llvm-svn: 19655
2005-01-18 02:51:41 +00:00
Chris Lattner
e2fd07b43d Make methods private, add a method.
llvm-svn: 19634
2005-01-17 17:14:43 +00:00