1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

13293 Commits

Author SHA1 Message Date
Alkis Evlogimenos
2faa6cdc75 Remove implementation of operator= and make it private so that it is
not used accidentally.

llvm-svn: 15172
2004-07-24 18:55:15 +00:00
Alkis Evlogimenos
0618429149 Change std::map<unsigned, LiveInterval*> into a std::map<unsigned,
LiveInterval>. This saves some space and removes the pointer
indirection caused by following the pointer.

llvm-svn: 15167
2004-07-24 11:44:15 +00:00
Chris Lattner
0d3969f3d1 Finally give bugpoint -timeout support!
llvm-svn: 15163
2004-07-24 07:53:26 +00:00
Chris Lattner
29e97f36bf obvious fix
llvm-svn: 15162
2004-07-24 07:51:27 +00:00
Chris Lattner
71a9eec1d3 Get rid of the printout from the low-level system interface
llvm-svn: 15161
2004-07-24 07:50:48 +00:00
Chris Lattner
f162d7dac2 Pass timeouts into the low level "execute program with timeout" function
llvm-svn: 15160
2004-07-24 07:49:11 +00:00
Chris Lattner
30a4ae76ad Provide timeout values to all abstract interpreters
llvm-svn: 15159
2004-07-24 07:48:50 +00:00
Chris Lattner
07dc2875c2 Add support for killing the program if it executes for too long.
llvm-svn: 15158
2004-07-24 07:41:31 +00:00
Chris Lattner
26856ab7c3 whoops, didn't mean to remove this
llvm-svn: 15157
2004-07-24 04:32:22 +00:00
Chris Lattner
de8efecef1 In the joiner, merge the small interval into the large interval. This restores
us back to taking about 10.5s on gcc, instead of taking 15.6s!  The net result
is that my big patches have hand no significant effect on compile time or code
quality.  heh.

llvm-svn: 15156
2004-07-24 03:41:50 +00:00
Chris Lattner
c71a9684f8 Completely eliminate the intervals_ list. instead, the r2iMap_ maintains
ownership of the intervals.

llvm-svn: 15155
2004-07-24 03:32:06 +00:00
Chris Lattner
b05762ade7 Big change to compute logical value numbers for each LiveRange added to an
Interval.  This generalizes the isDefinedOnce mechanism that we used before
to help us coallesce ranges that overlap.  As part of this, every logical
range with a different value is assigned a different number in the interval.
For example, for code that looks like this:

0  X = ...
4  X += ...
  ...
N    = X

We now generate a live interval that contains two ranges: [2,6:0),[6,?:1)
reflecting the fact that there are two different values in the range at
different positions in the code.

Currently we are not using this information at all, so this just slows down
liveintervals.  In the future, this will change.

Note that this change also substantially refactors the joinIntervalsInMachineBB
method to merge the cases for virt-virt and phys-virt joining into a single
case, adds comments, and makes the code a bit easier to follow.

llvm-svn: 15154
2004-07-24 02:59:07 +00:00
Chris Lattner
5ff4567405 Add a new differingRegisterClasses method
make overlapsAliases take pointers instead of references
fix indentation

llvm-svn: 15153
2004-07-24 02:53:43 +00:00
Chris Lattner
a3f7433b58 Little stuff:
* Fix comment typeo
* add dump() methods
* add a few new methods like getLiveRangeContaining, removeRange & joinable
  (which is currently the same as overlaps)
* Remove the unused operator==

Bigger change:

* In LiveInterval, instead of using a boolean isDefinedOnce to keep track of
  if there are > 1 definitions in a particular interval, keep a counter,
  NumValues to keep track of exactly how many there are.
* In LiveRange, add a new ValId element to indicate which of the numbered
  values each LiveRange belongs to.   We now no longer merge LiveRanges if
  they are of differing value ID's even if they are neighbors.

llvm-svn: 15152
2004-07-24 02:52:23 +00:00
Misha Brukman
c1e23e1939 Running list of bugs, unimplemented features, currently broken tests, until we
have a nightly tester set up for PowerPC.

llvm-svn: 15147
2004-07-23 22:37:22 +00:00
Misha Brukman
c7291558eb Eliminate spurious empty space; make code easier to page through.
llvm-svn: 15146
2004-07-23 22:35:49 +00:00
Misha Brukman
eaac0bbed7 Simplify boolean test.
llvm-svn: 15145
2004-07-23 21:43:26 +00:00
Chris Lattner
f60cf84fc5 More minor changes:
* Inline some functions
 * Eliminate some comparisons from the release build

This is good for another .3 on gcc.

llvm-svn: 15144
2004-07-23 21:24:19 +00:00
Misha Brukman
a899694208 Implement casting a floating point to 32-bit unsigned value
llvm-svn: 15143
2004-07-23 20:32:59 +00:00
Brian Gaeke
1584828633 bug fixed
llvm-svn: 15142
2004-07-23 19:41:13 +00:00
Chris Lattner
0475ecedab Change addRange and join to be a little bit smarter. In particular, we don't
want to insert a new range into the middle of the vector, then delete ranges
one at a time next to the inserted one as they are merged.

Instead, if the inserted interval overlaps, just start merging.  The only time
we insert into the middle of the vector is when we don't overlap at all.  Also
delete blocks of live ranges if we overlap with many of them.

This patch speeds up joining by .7 seconds on a large testcase, but more
importantly gets all of the range adding code into addRangeFrom.

llvm-svn: 15141
2004-07-23 19:38:44 +00:00
Brian Gaeke
bdab8e50cd Fix problem with inserting FunctionPasses that depend on ImmutablePasses
(e.g., LICM) into FunctionPassManagers. The problem is that we were
using a C-style cast to cast required analysis passes to PassClass*, but
if it's a FunctionPassManager, and the required analysis pass is an
ImmutablePass, the types aren't really compatible, so the C-style cast
causes a crash.

llvm-svn: 15140
2004-07-23 19:35:50 +00:00
Chris Lattner
de2859251e Search by the start point, not by the whole interval. This saves some
comparisons, reducing linscan by another .1 seconds :)

llvm-svn: 15139
2004-07-23 18:40:00 +00:00
Chris Lattner
56e3526765 New helper method
llvm-svn: 15138
2004-07-23 18:39:12 +00:00
Chris Lattner
b05751f2c7 Speedup debug builds a bit
llvm-svn: 15137
2004-07-23 18:38:52 +00:00
Chris Lattner
34c65f6b68 Instead of searching for a live interval pair, search for a location. This gives
a very modest speedup of .3 seconds compiling 176.gcc (out of 20s).

llvm-svn: 15136
2004-07-23 18:13:24 +00:00
Chris Lattner
a1bce98d7f Rename LiveIntervals.(cpp|h) -> LiveIntervalAnalysis.(cpp|h)
llvm-svn: 15135
2004-07-23 17:56:30 +00:00
Chris Lattner
52bdc9d978 Pull the LiveRange and LiveInterval classes out of LiveIntervals.h (which
will soon be renamed) into their own file.  The new file should not emit
DEBUG output or have other side effects.  The LiveInterval class also now
doesn't know whether its working on registers or some other thing.

In the future we will want to use the LiveInterval class and friends to do
stack packing.  In addition to a code simplification, this will allow us to
do it more easily.

llvm-svn: 15134
2004-07-23 17:49:16 +00:00
Misha Brukman
ef73e28236 * Codegen of GEPs dramatically improved by folding multiplies and adds
* Function pointers implemented correctly using appropriate stubs

Contributed by Nate Begeman.

llvm-svn: 15133
2004-07-23 16:08:20 +00:00
John Criswell
940e80d54e Revised the generation of files so that they follow the newer autoconf
standards.  This is in hopes of fixing configuration problems on
Windows Services for Unix.

llvm-svn: 15132
2004-07-23 15:40:57 +00:00
Chris Lattner
0ceb79ba34 Improve comments a bit
Use an explicit LiveRange class to represent ranges instead of an std::pair.
This is a minor cleanup, but is really intended to make a future patch simpler
and less invasive.

Alkis, could you please take a look at LiveInterval::liveAt?  I suspect that
you can add an operator<(unsigned) to LiveRange, allowing us to speed up the
upper_bound call by quite a bit (this would also apply to other callers of
upper/lower_bound).  I would do it myself, but I still don't understand that
crazy liveAt function, despite the comment. :)

Basically I would like to see this:
    LiveRange dummy(index, index+1);
    Ranges::const_iterator r = std::upper_bound(ranges.begin(),
                                                ranges.end(),
                                                dummy);

Turn into:
    Ranges::const_iterator r = std::upper_bound(ranges.begin(),
                                                ranges.end(),
                                                index);

llvm-svn: 15130
2004-07-23 08:24:23 +00:00
Chris Lattner
5fce7ec5ed Change column name
llvm-svn: 15129
2004-07-23 06:50:18 +00:00
Chris Lattner
a894b79444 Update live intervals more accurately for PHI elim. This slightly reduces
the live intervals for some registers.

llvm-svn: 15125
2004-07-23 05:27:43 +00:00
Chris Lattner
e04cefc866 Force coallescing of live ranges that have a single definition, even if they
interfere.  Because these intervals have a single definition, and one of them
is a copy instruction, they are always safe to merge even if their lifetimes
interfere.  This slightly reduces the amount of spill code, for example on
252.eon, from:

 12837 spiller               - Number of loads added
  7604 spiller               - Number of stores added
  5842 spiller               - Number of register spills
 18155 liveintervals         - Number of identity moves eliminated after coalescing

to:

  12754 spiller               - Number of loads added
   7585 spiller               - Number of stores added
   5803 spiller               - Number of register spills
  18262 liveintervals         - Number of identity moves eliminated after coalescing

The much much bigger win would be to merge intervals with multiple definitions
(aka phi nodes) but this is not that day.

llvm-svn: 15124
2004-07-23 05:26:05 +00:00
Misha Brukman
b521637a8d * Convert "\n" -> '\n'
* Print out another '\n' after printing out program execution status
* Make sure code wraps at 80 cols

llvm-svn: 15123
2004-07-23 01:30:49 +00:00
Misha Brukman
2ad2adf8cb Bool alignment on MacOSX/PowerPC is 4 bytes.
llvm-svn: 15122
2004-07-23 01:11:46 +00:00
Misha Brukman
3f338d98a6 * Change class of BoolTy back to cInt
* Fix indentation back to 2 spaces

llvm-svn: 15121
2004-07-23 01:11:19 +00:00
Misha Brukman
2b0205b8ab * Add BoolAlignment to TargetData, default is 1 byte, size 1 byte
* Convert tabs to spaces

llvm-svn: 15120
2004-07-23 01:09:52 +00:00
Misha Brukman
29445f8a8b * Add a BoolAlignment field to TargetData, default is 1 byte
* Fix spacing

llvm-svn: 15119
2004-07-23 01:08:13 +00:00
Chris Lattner
9c326b6cc8 costmetic changes
llvm-svn: 15118
2004-07-22 23:05:12 +00:00
Misha Brukman
670b1f6a75 Let's not get carried away here, please.
llvm-svn: 15117
2004-07-22 22:43:21 +00:00
John Criswell
9c8cbfff53 Give some credit to Oscar. Should help to address Bug#13.
llvm-svn: 15116
2004-07-22 22:11:16 +00:00
Chris Lattner
54f8932b3b Fix broken -debug printing
llvm-svn: 15115
2004-07-22 21:54:22 +00:00
Chris Lattner
0fbe7e1e60 The default has not been 'simple' for AGES!
llvm-svn: 15114
2004-07-22 21:46:02 +00:00
Chris Lattner
1e21b8c96f Remove some abandoned code that was never finished. If needed in the future
it can be ressurected from CVS.

llvm-svn: 15113
2004-07-22 21:32:38 +00:00
Chris Lattner
093d84c480 Remove some (LARGE) abandoned code for the release. If this is ever needed
again in the future, it can be resurrected out of CVS

llvm-svn: 15112
2004-07-22 21:30:35 +00:00
Chris Lattner
767638fe6d Make linear scan the default
llvm-svn: 15111
2004-07-22 18:42:00 +00:00
Misha Brukman
1109566c8d * Change bool from cInt to cByte (for now)
* Don't allow negative immediates to users of unsigned immediates
* Fix long compares
* Support <const int>, op as a potential immediate candidate
* Fix sign extension of short and byte loads
* Fix and improve integer casts
* Fix passing of doubles as vararg functions

Patch contributed by Nate Begeman.

llvm-svn: 15109
2004-07-22 15:58:04 +00:00
Alkis Evlogimenos
4b4712b58d Put variable name to a separate line.
llvm-svn: 15108
2004-07-22 15:30:33 +00:00
Misha Brukman
752cdcc2a5 Fix indentation and wrap code at 80 cols
llvm-svn: 15107
2004-07-22 15:26:23 +00:00