Remember to update LiveDebugVariables after per-block splitting.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 5 Aug 2011 23:10:40 +0000 (23:10 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 5 Aug 2011 23:10:40 +0000 (23:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136996 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocGreedy.cpp

index 63506f094b9548168a6830a532ee4bcd815d332c..291db7b4bfc4accf18323713d7517d19c9945b2f 100644 (file)
@@ -1032,7 +1032,7 @@ void RAGreedy::splitAroundRegion(LiveRangeEdit &LREdit,
 
   SmallVector<unsigned, 8> IntvMap;
   SE->finish(&IntvMap);
-  DebugVars->splitRegister(SA->getParent().reg, LREdit.regs());
+  DebugVars->splitRegister(Reg, LREdit.regs());
 
   ExtraRegInfo.resize(MRI->getNumVirtRegs());
   unsigned OrigBlocks = SA->getNumLiveBlocks();
@@ -1228,6 +1228,10 @@ unsigned RAGreedy::tryBlockSplit(LiveInterval &VirtReg, AllocationOrder &Order,
 
   // We did split for some blocks.
   SE->finish();
+
+  // Tell LiveDebugVariables about the new ranges.
+  DebugVars->splitRegister(Reg, LREdit.regs());
+
   setStage(NewVRegs.begin(), NewVRegs.end(), RS_Spill);
   if (VerifyEnabled)
     MF->verify(this, "After splitting live range around basic blocks");