[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp 
    Nate Begeman 
    natebegeman at mac.com
       
    Mon Dec  6 21:26:04 PST 2004
    
    
  
Changes in directory llvm/lib/CodeGen:
RegAllocLinearScan.cpp updated: 1.103 -> 1.104
---
Log message:
Move virtual function call out of loop to speed up getFreePhysReg by about
20%, shaving 0.1s off hbd compile time on my g5.  Yay.
---
Diffs of the changes:  (+2 -2)
Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.103 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.104
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.103	Thu Nov 18 00:01:45 2004
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp	Mon Dec  6 23:25:53 2004
@@ -608,8 +608,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