mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Don't assign new registers created during a split to the same stack slot, but
give them individual stack slots once the are actually spilled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117945 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -369,12 +369,12 @@ void InlineSpiller::spill(LiveRangeEdit &edit) {
|
||||
return;
|
||||
|
||||
rc_ = mri_.getRegClass(edit.getReg());
|
||||
stackSlot_ = edit.assignStackSlot(vrm_);
|
||||
stackSlot_ = vrm_.assignVirt2StackSlot(edit_->getReg());
|
||||
|
||||
// Update LiveStacks now that we are committed to spilling.
|
||||
LiveInterval &stacklvr = lss_.getOrCreateInterval(stackSlot_, rc_);
|
||||
if (!stacklvr.hasAtLeastOneValue())
|
||||
stacklvr.getNextValue(SlotIndex(), 0, lss_.getVNInfoAllocator());
|
||||
assert(stacklvr.empty() && "Just created stack slot not empty");
|
||||
stacklvr.getNextValue(SlotIndex(), 0, lss_.getVNInfoAllocator());
|
||||
stacklvr.MergeRangesInAsValue(edit_->getParent(), stacklvr.getValNumInfo(0));
|
||||
|
||||
// Iterate over instructions using register.
|
||||
|
Reference in New Issue
Block a user