[llvm-commits] CVS: llvm/lib/Target/Sparc/RegAlloc/PhyRegAlloc.cpp LiveRangeInfo.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Fri Feb 13 15:02:56 PST 2004


Changes in directory llvm/lib/Target/Sparc/RegAlloc:

PhyRegAlloc.cpp updated: 1.135 -> 1.136
LiveRangeInfo.cpp updated: 1.50 -> 1.51

---
Log message:

Remove getAllocatedRegNum(). Use getReg() instead.


---
Diffs of the changes:  (+5 -7)

Index: llvm/lib/Target/Sparc/RegAlloc/PhyRegAlloc.cpp
diff -u llvm/lib/Target/Sparc/RegAlloc/PhyRegAlloc.cpp:1.135 llvm/lib/Target/Sparc/RegAlloc/PhyRegAlloc.cpp:1.136
--- llvm/lib/Target/Sparc/RegAlloc/PhyRegAlloc.cpp:1.135	Wed Feb 11 22:01:07 2004
+++ llvm/lib/Target/Sparc/RegAlloc/PhyRegAlloc.cpp	Fri Feb 13 15:01:19 2004
@@ -1019,12 +1019,11 @@
   // explicit and implicit operands are set.
   for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
     if (MI->getOperand(i).hasAllocatedReg())
-      markRegisterUsed(MI->getOperand(i).getAllocatedRegNum(), RC, RegType,MRI);
+      markRegisterUsed(MI->getOperand(i).getReg(), RC, RegType,MRI);
 
   for (unsigned i = 0, e = MI->getNumImplicitRefs(); i != e; ++i)
     if (MI->getImplicitOp(i).hasAllocatedReg())
-      markRegisterUsed(MI->getImplicitOp(i).getAllocatedRegNum(), RC,
-                       RegType,MRI);
+      markRegisterUsed(MI->getImplicitOp(i).getReg(), RC, RegType,MRI);
 
   // Add all of the scratch registers that are used to save values across the
   // instruction (e.g., for saving state register values).


Index: llvm/lib/Target/Sparc/RegAlloc/LiveRangeInfo.cpp
diff -u llvm/lib/Target/Sparc/RegAlloc/LiveRangeInfo.cpp:1.50 llvm/lib/Target/Sparc/RegAlloc/LiveRangeInfo.cpp:1.51
--- llvm/lib/Target/Sparc/RegAlloc/LiveRangeInfo.cpp:1.50	Wed Feb 11 20:27:09 2004
+++ llvm/lib/Target/Sparc/RegAlloc/LiveRangeInfo.cpp	Fri Feb 13 15:01:19 2004
@@ -194,9 +194,8 @@
           // set it directly in the LiveRange
           if (OpI.getMachineOperand().hasAllocatedReg()) {
             unsigned getClassId;
-            LR->setColor(MRI.getClassRegNum(
-                                OpI.getMachineOperand().getAllocatedRegNum(),
-                                getClassId));
+            LR->setColor(MRI.getClassRegNum(OpI.getMachineOperand().getReg(),
+                                            getClassId));
           }
 	}
 
@@ -212,7 +211,7 @@
           if (MInst->getImplicitOp(i).hasAllocatedReg()) {
             unsigned getClassId;
             LR->setColor(MRI.getClassRegNum(
-                                MInst->getImplicitOp(i).getAllocatedRegNum(),
+                                MInst->getImplicitOp(i).getReg(),
                                 getClassId));
           }
 	}





More information about the llvm-commits mailing list