Include snippets in the live stack interval.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 12 Mar 2011 04:25:36 +0000 (04:25 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 12 Mar 2011 04:25:36 +0000 (04:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127530 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/InlineSpiller.cpp

index 8c8279510b2603b010bca158576828e137d29066..8964853e9fde4bd87c2d2237d274ba4dba80ee48 100644 (file)
@@ -555,7 +555,9 @@ void InlineSpiller::spill(LiveRangeEdit &edit) {
   LiveInterval &stacklvr = lss_.getOrCreateInterval(stackSlot_, rc_);
   if (!stacklvr.hasAtLeastOneValue())
     stacklvr.getNextValue(SlotIndex(), 0, lss_.getVNInfoAllocator());
-  stacklvr.MergeRangesInAsValue(edit_->getParent(), stacklvr.getValNumInfo(0));
+  for (unsigned i = 0, e = RegsToSpill.size(); i != e; ++i)
+    stacklvr.MergeRangesInAsValue(lis_.getInterval(RegsToSpill[i]),
+                                  stacklvr.getValNumInfo(0));
 
   // Spill around uses of all RegsToSpill.
   for (unsigned i = 0, e = RegsToSpill.size(); i != e; ++i)