diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-11-01 19:49:57 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-11-01 19:49:57 +0000 |
| commit | ba9a4985a215d0394733c5af7bddba3cf02118a9 (patch) | |
| tree | f1e0d9ea11b0fa6394b19e1820c9ea041d9e0181 /llvm/lib/CodeGen/InlineSpiller.cpp | |
| parent | 31fffb62d9f1b32346262e6275495a0ac6267997 (diff) | |
| download | bcm5719-llvm-ba9a4985a215d0394733c5af7bddba3cf02118a9.tar.gz bcm5719-llvm-ba9a4985a215d0394733c5af7bddba3cf02118a9.zip | |
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.
llvm-svn: 117945
Diffstat (limited to 'llvm/lib/CodeGen/InlineSpiller.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/InlineSpiller.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp index 0bae9dfb62f..61103bfb2ec 100644 --- a/llvm/lib/CodeGen/InlineSpiller.cpp +++ b/llvm/lib/CodeGen/InlineSpiller.cpp @@ -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. |

