[llvm-commits] [llvm] r121411 - /llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Dec 9 13:20:46 PST 2010


Author: stoklund
Date: Thu Dec  9 15:20:46 2010
New Revision: 121411

URL: http://llvm.org/viewvc/llvm-project?rev=121411&view=rev
Log:
Remember to filter out reserved rergisters from the allocation order.

Modified:
    llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp

Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=121411&r1=121410&r2=121411&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Thu Dec  9 15:20:46 2010
@@ -165,7 +165,7 @@
          E = TRC->allocation_order_end(*MF);
        I != E; ++I) {
     unsigned PhysReg = *I;
-    if (PhysReg == OldPhysReg)
+    if (PhysReg == OldPhysReg || ReservedRegs.test(PhysReg))
       continue;
 
     // Instantiate a "subquery", not to be confused with the Queries array.





More information about the llvm-commits mailing list