Commit Graph

118 Commits

Author SHA1 Message Date
Alkis Evlogimenos 2e8c984c58 Improve debugging output when choosing a register to spill.
llvm-svn: 10604
2003-12-24 18:53:31 +00:00
Alkis Evlogimenos 7d7d7e89d4 Change the way free regusters are computed and perform better
allocation in the presence of preallocated intervals.

llvm-svn: 10595
2003-12-23 18:00:33 +00:00
Alkis Evlogimenos 690e1b8de2 Remove verifyIntervals() since it doesn't actually work right now.
llvm-svn: 10570
2003-12-21 20:41:26 +00:00
Alkis Evlogimenos 2665d9c6f9 Change weight into a float so that we can take into account the
nesting level when computing it. Right now the allocator uses:

    w = sum_over_defs_uses( 10 ^ nesting level );

llvm-svn: 10569
2003-12-21 20:19:10 +00:00
Alkis Evlogimenos c09b77ea35 Add support for inactive intervals. This effectively reuses registers
for live ranges that fall into assigned registers' holes.

llvm-svn: 10566
2003-12-21 05:43:40 +00:00
Chris Lattner 8f88cdfa22 Prune some #includes
Add a statistic for # reloads

llvm-svn: 10518
2003-12-18 20:25:31 +00:00
Alkis Evlogimenos e5e2bd6777 Modify linear scan register allocator to use the two-address
instruction pass. This also fixes all remaining bugs for this new
allocator to pass all tests under test/Programs.

llvm-svn: 10515
2003-12-18 13:15:02 +00:00
Alkis Evlogimenos 3bd69eaac5 Fix bug in reserved registers. DH actually aliases DX and EDX which
are not reserved registers.

llvm-svn: 10514
2003-12-18 13:12:18 +00:00
Alkis Evlogimenos 4d87219486 Rename LiveIntervals::expired() to LiveIntervals::expiredAt().
llvm-svn: 10511
2003-12-18 08:56:11 +00:00
Alkis Evlogimenos aaba4639f8 Change interface of MachineOperand as follows:
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
    b) add isUse(), isDef()
    c) rename opHiBits32() to isHiBits32(),
              opLoBits32() to isLoBits32(),
              opHiBits64() to isHiBits64(),
              opLoBits64() to isLoBits64().

This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.

llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Alkis Evlogimenos 4f7f017ab5 When reserving a preallocated register spill the aliases of this
register too.

llvm-svn: 10450
2003-12-13 11:58:10 +00:00
Alkis Evlogimenos ed53b35076 Expire any active intervals left when register allocation is done.
llvm-svn: 10448
2003-12-13 05:50:19 +00:00
Alkis Evlogimenos e6dc614c3c Add instruction numbers to debugging output.
llvm-svn: 10447
2003-12-13 05:48:57 +00:00
Alkis Evlogimenos f8fe176204 Fix bug in register spilling when a preallocated live range overlaps a
potential register assignment.

llvm-svn: 10291
2003-12-05 11:17:55 +00:00
Alkis Evlogimenos 5fe0031c68 Improve debugging output and clean up some code.
llvm-svn: 10288
2003-12-04 03:57:28 +00:00
Alkis Evlogimenos 26f17e73eb Print instructions before register allocation is performed. Also fix
bug where spill instructions were added to the next basic block
instead of the end of the current one if the instruction that required
the spill was the last in the block.

llvm-svn: 10272
2003-11-30 23:40:39 +00:00
Alkis Evlogimenos 0aa40f8db0 Remove "numReloaded" statistic.
llvm-svn: 10268
2003-11-30 05:15:36 +00:00
Alkis Evlogimenos 0e9ded74c0 Merging the linear scan register allocator in trunk. It currently passes most tests under test/Programs/SingleSource/Benchmarks/Shootout so development will continue on trunk. The allocator is not enabled by default. You will need to pass -regallo=linearscan to lli or llc to use it.
llvm-svn: 10103
2003-11-20 03:32:25 +00:00