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

Chris Lattner lattner at cs.uiuc.edu
Tue Feb 17 01:03:08 PST 2004


Changes in directory llvm/lib/CodeGen:

RegAllocLocal.cpp updated: 1.48 -> 1.49

---
Log message:

Fix a bug in my previous refactoring change... arg!


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

Index: llvm/lib/CodeGen/RegAllocLocal.cpp
diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.48 llvm/lib/CodeGen/RegAllocLocal.cpp:1.49
--- llvm/lib/CodeGen/RegAllocLocal.cpp:1.48	Mon Feb 16 22:08:37 2004
+++ llvm/lib/CodeGen/RegAllocLocal.cpp	Tue Feb 17 01:02:17 2004
@@ -492,7 +492,9 @@
   const TargetRegisterClass *RC = MF->getSSARegMap()->getRegClass(VirtReg);
   unsigned PhysReg = getFreeReg(RC);
 
-  if (PhysReg == 0) {  // No registers available...
+  if (PhysReg) {  // PhysReg available!
+    PhysReg = getReg(MBB, MI, VirtReg);
+  } else {  // No registers available...
     /// If we can fold this spill into this instruction, do so now.
     if (0) {
       // TODO





More information about the llvm-commits mailing list