mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Change the Spiller interface to take a LiveRangeEdit reference.
This makes it possible to register delegates and get callbacks when the spiller edits live ranges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127389 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
|
||||
#define DEBUG_TYPE "regalloc"
|
||||
#include "LiveIntervalUnion.h"
|
||||
#include "LiveRangeEdit.h"
|
||||
#include "RegAllocBase.h"
|
||||
#include "RenderMachineFunction.h"
|
||||
#include "Spiller.h"
|
||||
@ -344,7 +345,8 @@ void RegAllocBase::spillReg(LiveInterval& VirtReg, unsigned PhysReg,
|
||||
unassign(SpilledVReg, PhysReg);
|
||||
|
||||
// Spill the extracted interval.
|
||||
spiller().spill(&SpilledVReg, SplitVRegs, &PendingSpills);
|
||||
LiveRangeEdit LRE(SpilledVReg, SplitVRegs, 0, &PendingSpills);
|
||||
spiller().spill(LRE);
|
||||
}
|
||||
// After extracting segments, the query's results are invalid. But keep the
|
||||
// contents valid until we're done accessing pendingSpills.
|
||||
@ -469,7 +471,8 @@ unsigned RABasic::selectOrSplit(LiveInterval &VirtReg,
|
||||
}
|
||||
// No other spill candidates were found, so spill the current VirtReg.
|
||||
DEBUG(dbgs() << "spilling: " << VirtReg << '\n');
|
||||
spiller().spill(&VirtReg, SplitVRegs, 0);
|
||||
LiveRangeEdit LRE(VirtReg, SplitVRegs);
|
||||
spiller().spill(LRE);
|
||||
|
||||
// The live virtual register requesting allocation was spilled, so tell
|
||||
// the caller not to allocate anything during this round.
|
||||
|
Reference in New Issue
Block a user