[llvm-commits] [llvm] r133569 - /llvm/trunk/lib/CodeGen/RegAllocFast.cpp

Devang Patel dpatel at apple.com
Tue Jun 21 16:02:36 PDT 2011


Author: dpatel
Date: Tue Jun 21 18:02:36 2011
New Revision: 133569

URL: http://llvm.org/viewvc/llvm-project?rev=133569&view=rev
Log:
After register is spilled there should not be any DBG_VALUE referring the same register.

Modified:
    llvm/trunk/lib/CodeGen/RegAllocFast.cpp

Modified: llvm/trunk/lib/CodeGen/RegAllocFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocFast.cpp?rev=133569&r1=133568&r2=133569&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocFast.cpp Tue Jun 21 18:02:36 2011
@@ -293,9 +293,11 @@
         MachineBasicBlock *MBB = DBG->getParent();
         MBB->insert(MI, NewDV);
         DEBUG(dbgs() << "Inserting debug info due to spill:" << "\n" << *NewDV);
-        LRIDbgValues[li] = NewDV;
       }
     }
+    // Now this register is spilled there is should not be any DBG_VALUE pointing
+    // to this register because they are all pointing to spilled value now.
+    LRIDbgValues.clear();
     if (SpillKill)
       LR.LastUse = 0; // Don't kill register again
   }





More information about the llvm-commits mailing list