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

Chris Lattner lattner at cs.uiuc.edu
Fri Sep 8 13:21:45 PDT 2006



Changes in directory llvm/lib/CodeGen:

RegAllocLocal.cpp updated: 1.91 -> 1.92
---
Log message:

Non-allocatable physregs can be killed and dead, but don't treat them as
safe for later allocation.  This fixes McCat/18-imp with llc-beta.


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

 RegAllocLocal.cpp |    6 ++++++
 1 files changed, 6 insertions(+)


Index: llvm/lib/CodeGen/RegAllocLocal.cpp
diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.91 llvm/lib/CodeGen/RegAllocLocal.cpp:1.92
--- llvm/lib/CodeGen/RegAllocLocal.cpp:1.91	Fri Sep  8 14:11:11 2006
+++ llvm/lib/CodeGen/RegAllocLocal.cpp	Fri Sep  8 15:21:31 2006
@@ -580,6 +580,9 @@
         unsigned &PhysRegSlot = getVirt2PhysRegMapSlot(VirtReg);
         PhysReg = PhysRegSlot;
         PhysRegSlot = 0;
+      } else if (PhysRegsUsed[PhysReg] == -2) {
+        // Unallocatable register dead, ignore.
+        continue;
       }
 
       if (PhysReg) {
@@ -669,6 +672,9 @@
         PhysReg = PhysRegSlot;
         assert(PhysReg != 0);
         PhysRegSlot = 0;
+      } else if (PhysRegsUsed[PhysReg] == -2) {
+        // Unallocatable register dead, ignore.
+        continue;
       }
 
       if (PhysReg) {






More information about the llvm-commits mailing list