[llvm-commits] [llvm] r89376 -	/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
    David Greene 
    greened at obbligato.org
       
    Thu Nov 19 11:09:39 PST 2009
    
    
  
Author: greened
Date: Thu Nov 19 13:09:39 2009
New Revision: 89376
URL: http://llvm.org/viewvc/llvm-project?rev=89376&view=rev
Log:
Fix a small bug.
Fix one case we missed to make sure we reserve registers from
allocation.
Modified:
    llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=89376&r1=89375&r2=89376&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Thu Nov 19 13:09:39 2009
@@ -1435,7 +1435,7 @@
     if (SkipDGRegs && DowngradedRegs.count(Reg))
       continue;
     if (isRegAvail(Reg) && Reg < inactiveCounts.size() &&
-        FreeRegInactiveCount < inactiveCounts[Reg]) {
+        FreeRegInactiveCount < inactiveCounts[Reg] && !isRecentlyUsed(Reg)) {
       FreeReg = Reg;
       FreeRegInactiveCount = inactiveCounts[Reg];
       if (FreeRegInactiveCount == MaxInactiveCount)
    
    
More information about the llvm-commits
mailing list