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

Chris Lattner lattner at cs.uiuc.edu
Tue Dec 14 23:04:46 PST 2004



Changes in directory llvm/lib/CodeGen:

RegAllocIterativeScan.cpp updated: 1.18 -> 1.19
---
Log message:

Move virtual method call out of loop


---
Diffs of the changes:  (+4 -4)

Index: llvm/lib/CodeGen/RegAllocIterativeScan.cpp
diff -u llvm/lib/CodeGen/RegAllocIterativeScan.cpp:1.18 llvm/lib/CodeGen/RegAllocIterativeScan.cpp:1.19
--- llvm/lib/CodeGen/RegAllocIterativeScan.cpp:1.18	Wed Nov 17 19:29:39 2004
+++ llvm/lib/CodeGen/RegAllocIterativeScan.cpp	Wed Dec 15 01:04:32 2004
@@ -397,8 +397,8 @@
   float minWeight = HUGE_VAL;
   unsigned minReg = 0;
   const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(cur->reg);
-  for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_);
-       i != rc->allocation_order_end(*mf_); ++i) {
+  for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_),
+       e = rc->allocation_order_end(*mf_); i != e; ++i) {
     unsigned reg = *i;
     if (minWeight > spillWeights_[reg]) {
       minWeight = spillWeights_[reg];
@@ -477,8 +477,8 @@
   const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(cur->reg);
 
   unsigned freeReg = 0;
-  for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_);
-       i != rc->allocation_order_end(*mf_); ++i) {
+  for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_),
+       e = rc->allocation_order_end(*mf_); i != e; ++i) {
     unsigned reg = *i;
     if (prt_->isRegAvail(reg) &&
         (!freeReg || inactiveCounts[freeReg] < inactiveCounts[reg]))






More information about the llvm-commits mailing list