[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLocal.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Feb 19 12:38:12 PST 2004


Changes in directory llvm/lib/CodeGen:

RegAllocLocal.cpp updated: 1.52 -> 1.53

---
Log message:

Fix problem fusing spill code into instructions: we didn't update the live
variable information to take into account the change of instruction
address.


---
Diffs of the changes:  (+3 -0)

Index: llvm/lib/CodeGen/RegAllocLocal.cpp
diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.52 llvm/lib/CodeGen/RegAllocLocal.cpp:1.53
--- llvm/lib/CodeGen/RegAllocLocal.cpp:1.52	Thu Feb 19 00:19:09 2004
+++ llvm/lib/CodeGen/RegAllocLocal.cpp	Thu Feb 19 12:34:02 2004
@@ -496,6 +496,9 @@
     MachineBasicBlock::iterator MII = MI;
     if (RegInfo->foldMemoryOperand(MII, OpNum, FrameIndex)) {
       ++NumFused;
+      // Since we changed the address of MI, make sure to update live variables
+      // to know that the new instruction has the properties of the old one.
+      LV->instructionChanged(MI, MII);
       return MII;
     }
 





More information about the llvm-commits mailing list