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

1234 Commits

Author SHA1 Message Date
Chris Lattner
c23cebb206 Fix typeo
llvm-svn: 17938
2004-11-18 04:31:10 +00:00
Chris Lattner
3a6991f745 Start using the iterators in the fixed_ intervals to avoid having to binary
search physreg intervals every time we access it.  This takes another
half second off of linscan.

llvm-svn: 17937
2004-11-18 04:13:02 +00:00
Chris Lattner
189acb3955 Take another .7 seconds off of linear scan time.
llvm-svn: 17936
2004-11-18 04:02:11 +00:00
Chris Lattner
a52650a18a Add a counter for the number of times linscan has to backtrack. Start using
the iterator hints we have to speed up overlaps().  This speeds linscan up
by about .2s (out of 8.7) on 175.vpr for PPC.

llvm-svn: 17935
2004-11-18 03:49:30 +00:00
Chris Lattner
2edc3cec62 Add ability to give hints to the overlaps routines.
llvm-svn: 17934
2004-11-18 03:47:34 +00:00
Chris Lattner
18ced80110 * Improve comments/documentation substantially
* Eliminate the releaseMemory method, this is not an analysis
* Change the fixed, active, and inactive lists of intervals to maintain an
  iterator for the current position in the interval.  This allows us to do
  constant time increments of the iterator instead of having to do a binary
  search to find our liverange in our liveinterval all of the time, which
  substantially speeds up cases where LiveIntervals have many LiveRanges
  - which is very common for physical registers.  On targets with many
  physregs, this can make a noticable difference.

  With a release build of LLC for PPC, this halves the time in
  processInactiveIntervals and processActiveIntervals, from 1.5s to .75s.

  This also lays the ground for more to come.

llvm-svn: 17933
2004-11-18 02:42:27 +00:00
Chris Lattner
3bf87c8f95 Add new advanceTo method
llvm-svn: 17932
2004-11-18 02:37:31 +00:00
Chris Lattner
77a4102d91 Fix a minor bug in expiredAt. endNumber() is the first number that is not valid.
llvm-svn: 17931
2004-11-18 01:34:44 +00:00
Chris Lattner
ddc898639f Rename some methods, use 'begin' instead of 'start', add new LiveInterval
iterator/begin/end members.

llvm-svn: 17930
2004-11-18 01:29:39 +00:00
Brian Gaeke
23b56332bc Give a better message for a common assertion failure.
llvm-svn: 17887
2004-11-16 06:52:35 +00:00
Chris Lattner
bde92f3c03 Do not make i have bigger scope that we need
llvm-svn: 17483
2004-11-05 04:47:37 +00:00
Reid Spencer
d3f7233495 Change Library Names Not To Conflict With Others When Installed
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Chris Lattner
2c73917686 Move method bodies that depend on <algorithm> from MBB.h to MBB.cpp
llvm-svn: 17253
2004-10-26 15:43:42 +00:00
Chris Lattner
a361504a90 Clean up the MachineBasicBlock.h file, percolating #includes into this file.
Patch contributed by Morten Ofstad

llvm-svn: 17251
2004-10-26 15:35:58 +00:00
Chris Lattner
6e775d56cf Reduce usage of MRegisterInfo::getRegClass
llvm-svn: 17238
2004-10-26 05:29:18 +00:00
Chris Lattner
84b07af401 Do not use variable sized arrays in C++, they are non-portable. Patch
contributed by Morten Ofstad

llvm-svn: 17217
2004-10-25 18:44:14 +00:00
Chris Lattner
ec942219ad Patch to support MSVC better, contributed by Morten Ofstad
llvm-svn: 17215
2004-10-25 18:40:47 +00:00
Reid Spencer
e48ba34fd4 We won't use automake
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer
ce514b1c2c Initial automake generated Makefile template
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Chris Lattner
8d479b62ad Add support for undef
llvm-svn: 17055
2004-10-16 18:19:26 +00:00
Chris Lattner
65976f4178 Allow machine operands to represent global variables with offsets. This is
useful when you have a reference like:

int A[100];

void foo() { A[10] = 1; }

In this case, &A[10] is a single constant and should be treated as such.

Only MO_GlobalAddress and MO_ExternalSymbol are allowed to use this field, no
other operand type is.

This is another fine patch contributed by Jeff Cohen!!

llvm-svn: 17007
2004-10-15 04:38:41 +00:00
Chris Lattner
34acee9dbd This patch fixes the nasty bug that caused 175.vpr to fail for X86 last night.
The problem occurred when trying to reload this instruction:

MOV32mr %reg2326, 8, %reg2297, 4, %reg2295

The value of reg2326 was available in EBX, so it was reused from there, instead
of reloading it into EDX.

The value of reg2297 was available in EDX, so it was reused from there, instead
of reloading it into EDI.

The value of reg2295 was not available, so we tried reloading it into EBX, its
assigned register.  However, we checked and saw that we already reloaded
something into EBX, so we chose what reg2326 was assigned to (EDX) and reloaded
into that register instead.

Unfortunately EDX had already been used by reg2297, so reloading into EDX
clobbered the value used by the reg2326 operand, breaking the program.

The fix for this is to check that the newly picked register is ok.  In this
case we now find that EDX is already used and try using EDI, which succeeds.

llvm-svn: 17006
2004-10-15 03:19:31 +00:00
Chris Lattner
2c87b68231 This patch adds and improves debugging output. No functionality changes.
llvm-svn: 17005
2004-10-15 03:16:29 +00:00
Reid Spencer
e6418ec30f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Misha Brukman
5e9e7cada2 ModuloScheduling has moved to lib/Target/SparcV9
llvm-svn: 16906
2004-10-10 23:37:40 +00:00
Misha Brukman
020c3ab94c ModuloScheduling moved to lib/Target/SparcV9 as it is SparcV9-specific
llvm-svn: 16902
2004-10-10 23:33:20 +00:00
Tanya Lattner
be65f6cd02 Added debug information. Fixed several bugs in the reconstruct loop function.
llvm-svn: 16895
2004-10-10 22:44:35 +00:00
Reid Spencer
b317fd443c Remove the InstrSched directory (moved to SparcV9)
llvm-svn: 16887
2004-10-10 21:19:41 +00:00
Reid Spencer
064bebfba3 Directory no long exists (moved to Targets/SparcV9).
llvm-svn: 16886
2004-10-10 21:18:31 +00:00
Reid Spencer
7d9cba7a0f Initial version of automake Makefile.am file.
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Misha Brukman
af84f00600 Hyphenate target-(in)dependent for more tasty grammar goodness (tm)
llvm-svn: 16854
2004-10-08 19:43:31 +00:00
Misha Brukman
a01e5cd2ea InstrSched has been moved to lib/Target/SparcV9
llvm-svn: 16850
2004-10-08 18:12:53 +00:00
Misha Brukman
049f559995 InstrSched is SparcV9-specific and so has been moved to lib/Target/SparcV9/
llvm-svn: 16849
2004-10-08 18:12:14 +00:00
Misha Brukman
5ea7613a13 Single-space instead of double-spacing in the Makefile
llvm-svn: 16845
2004-10-08 18:05:25 +00:00
Chris Lattner
815b635639 Do not repeat the map lookup
llvm-svn: 16633
2004-10-01 23:16:43 +00:00
Chris Lattner
c521544a32 When a virtual register is folded into an instruction, keep track of whether
it was a use, def, or both.  This allows us to be less pessimistic in our
analysis of them.  In practice, this doesn't make a big difference, but it
doesn't hurt either.

llvm-svn: 16632
2004-10-01 23:15:36 +00:00
Chris Lattner
38467b8a66 Add a simple little improvement to the local spiller to keep track of stores
and delete them if they turn out to be dead.  This is a useful little hack
that even speeds up some programs.  For example, it speeds up Ptrdist/ks
from 17.53s to 15.59s, and 188.ammp from 149s to 146s.

This also speeds up llc :)

llvm-svn: 16630
2004-10-01 19:47:12 +00:00
Chris Lattner
8a5b40154f Substantially revamp the local spiller, causing it to actually improve the
generated code over the simple spiller.  The new local spiller generates
substantially better code than the simple one in some cases, by reusing
values that are loaded out of stack slots and kept available in registers.

This primarily helps programs that are spilling a lot, and there is still
stuff that can be done to improve it.  This patch makes the local spiller
the default, as it's only a tiny bit slower than the simple spiller (it
increases the runtime of llc by < 1%).

Here are some numbers with speedups.

Program    #reuse  old(s)    new(s)  Speedup

Povray:     3452,  16.87 ->  15.93   (5.5%)
177.mesa:   2176,   2.77 ->   2.76   (0%)
179.art:      35,  28.43 ->  28.01   (1.5%)
183.equake:   55,  61.44 ->  61.41   (0%)
188.ammp:    869, 174    -> 149      (15%)

164.gzip:     43,  40.73 ->  40.71   (0%)
175.vpr:     351,  18.54 ->  17.34   (6.5%)
176.gcc:    2471,   5.01 ->   4.92   (1.8%)
181.mcf       42,  79.30 ->  75.20   (5.2%)
186.crafty:  484,  29.73 ->  30.04   (-1%)
197.parser:  251,  10.47 ->  10.67   (-1%)
252.eon:    1501,   1.98 ->   1.75   (12%)
253.perlbm: 1183,  14.83 ->  14.42   (2.8%)
254.gap:     825,   7.46 ->   7.29   (2.3%)
255.vortex:  285,  10.51 ->  10.27   (2.3%)
256.bzip2:    63,  55.70 ->  55.20   (0.9%)
300.twolf:   830,  21.63 ->  22.00   (-1%)

PtrDist/ks    14,  32.75 -> 17.53    (46.5%)
Olden/tsp     46,   8.71 ->  8.24    (5.4%)
Free/distray  70,   1.09 ->  0.99    (9.2%)

llvm-svn: 16629
2004-10-01 19:04:51 +00:00
Chris Lattner
2ddd74fa8b Pretty print a bit nicer :)
llvm-svn: 16628
2004-10-01 19:01:39 +00:00
Alkis Evlogimenos
8e4ed30dcb Document this class a bit :-)
llvm-svn: 16626
2004-10-01 00:35:07 +00:00
Chris Lattner
db2a0987cc Use more efficient map operations. Fix a bug that would affect hypothetical
targets that supported multiple memory operands.

llvm-svn: 16614
2004-09-30 16:35:08 +00:00
Chris Lattner
8d8b8b05bd There is no need to call MachineInstr::print directly, just send the MI& to an ostream.
llvm-svn: 16613
2004-09-30 16:10:45 +00:00
Chris Lattner
bb425800f5 * Wrap some comments to 80 cols
* Add const_iterator stuff
* Add a print method, which means that I can now call dump() from the
  debugger.

llvm-svn: 16612
2004-09-30 15:59:17 +00:00
Chris Lattner
168a4380d9 Simplify the logic in the simple spiller and capitalize some variables
llvm-svn: 16609
2004-09-30 02:59:33 +00:00
Chris Lattner
1f61bfb971 Switch from defaulting to the 'local' spiller to the 'simple' spiller. The
two spillers produce perfectly identical code (at least on povray and eon),
but the simple spiller is substantially faster than the local spiller. Once
the local spiller is improved, we can switch back.

Switching cuts 5.2% off of the llc time for povray (about 1.3s).

llvm-svn: 16608
2004-09-30 02:40:06 +00:00
Chris Lattner
d716b5739c Don't use a densemap for keeping track of which vregs are already loaded, just
use a simple vector.  This speeds up -spiller=simple from taking 22s to taking
.1s on povray (debug build).  This change does not modify the generated code.

llvm-svn: 16607
2004-09-30 02:33:48 +00:00
Chris Lattner
d27ff8035e Use longer and more explicit names for instance vars (particularly important
data structures).  Fix the print method to send to the right ostream, not
always cerr.  Delete typedefs that are only used once.

llvm-svn: 16606
2004-09-30 02:15:18 +00:00
Chris Lattner
962d398430 Free the VirtRegMap at the end of MachineFunction processing instead of at
the beginning of processing the next one.

llvm-svn: 16605
2004-09-30 02:02:33 +00:00
Chris Lattner
418207045d Reindent code, improve comments, move huge nested methods out of classes,
prune #includes, add print/dump methods, etc.  No functionality changes.

llvm-svn: 16604
2004-09-30 01:54:45 +00:00
Alkis Evlogimenos
4f5920aaef Add includes and use std:: for standard library calls to make code
compile on windows. This patch was contributed by Paolo Invernizzi.

llvm-svn: 16539
2004-09-28 14:42:44 +00:00