mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Spill multiple registers at once.
Live range splitting can create a number of small live ranges containing only a single real use. Spill these small live ranges along with the large range they are connected to with copies. This enables memory operand folding and maximizes the spill to fill distance. Work in progress with known bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127529 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -289,6 +289,13 @@ void RegAllocBase::allocatePhysRegs() {
|
||||
|
||||
// Continue assigning vregs one at a time to available physical registers.
|
||||
while (LiveInterval *VirtReg = dequeue()) {
|
||||
// Unused registers can appear when the spiller coalesces snippets.
|
||||
if (MRI->reg_nodbg_empty(VirtReg->reg)) {
|
||||
DEBUG(dbgs() << "Dropping unused " << *VirtReg << '\n');
|
||||
LIS->removeInterval(VirtReg->reg);
|
||||
continue;
|
||||
}
|
||||
|
||||
// selectOrSplit requests the allocator to return an available physical
|
||||
// register if possible and populate a list of new live intervals that
|
||||
// result from splitting.
|
||||
|
Reference in New Issue
Block a user