aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocLinearScan.cpp
AgeCommit message (Collapse)Author
2004-01-16Fold open interval ends handling intoAlkis Evlogimenos
LiveIntervals::Interval::expiredAt() and simplify regalloc code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14Improve debugging output.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10834 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-13Indentation and whitespace cleanups.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10820 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-13Fix bug introduced by previous commit: check if fixed intervalsAlkis Evlogimenos
overlap before adding their spill weight. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10819 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-07Add a separate list of fixed intervals. This improves the running timeAlkis Evlogimenos
of the register allocator as follows: before after mesa 2.3790 1.5994 vpr 2.6008 1.2078 gcc 1.9840 0.5273 mcf 0.2569 0.0470 eon 1.8468 1.4359 twolf 0.9475 0.2004 burg 1.6807 1.3300 lambda 1.2191 0.3764 Speedups range anyware from 30% to over 400% :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10712 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-07Minor cleanups.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10711 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-07Remove declared but undefined method.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10710 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-05Remove simple coalescing.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10695 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28Reserve ECX and EDI instead of EBX and EDI. Since EBX is a calleeAlkis Evlogimenos
saved register it has a longer free range than ECX (which is defined every time there is a fnuction call) which makes ECX a better register to reserve. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10635 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28Add coalescing to register allocator. A hint is added to each intervalAlkis Evlogimenos
which denotes the register we would like to be assigned to (virtual or physical). In register allocation, if this hint exists and we can map it to a physical register (it is either a physical register or it is a virtual register that already got assigned to a physical one) we use that register if it is available instead of a random one in the free pool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10634 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-24Improve debugging output when choosing a register to spill.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10604 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23Change the way free regusters are computed and perform betterAlkis Evlogimenos
allocation in the presence of preallocated intervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10595 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21Remove verifyIntervals() since it doesn't actually work right now.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10570 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21Change weight into a float so that we can take into account theAlkis Evlogimenos
nesting level when computing it. Right now the allocator uses: w = sum_over_defs_uses( 10 ^ nesting level ); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10569 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21Add support for inactive intervals. This effectively reuses registersAlkis Evlogimenos
for live ranges that fall into assigned registers' holes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10566 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18Prune some #includesChris Lattner
Add a statistic for # reloads git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10518 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18Modify linear scan register allocator to use the two-addressAlkis Evlogimenos
instruction pass. This also fixes all remaining bugs for this new allocator to pass all tests under test/Programs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10515 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18Fix bug in reserved registers. DH actually aliases DX and EDX whichAlkis Evlogimenos
are not reserved registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10514 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18Rename LiveIntervals::expired() to LiveIntervals::expiredAt().Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10511 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14Change interface of MachineOperand as follows:Alkis Evlogimenos
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13When reserving a preallocated register spill the aliases of thisAlkis Evlogimenos
register too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10450 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13Expire any active intervals left when register allocation is done.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10448 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13Add instruction numbers to debugging output.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10447 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-05Fix bug in register spilling when a preallocated live range overlaps aAlkis Evlogimenos
potential register assignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-04Improve debugging output and clean up some code.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10288 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30Print instructions before register allocation is performed. Also fixAlkis Evlogimenos
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10272 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30Remove "numReloaded" statistic.Alkis Evlogimenos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10268 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20Merging the linear scan register allocator in trunk. It currently passes ↵Alkis Evlogimenos
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10103 91177308-0d34-0410-b5e6-96231b3b80d8