ira-color.c (assign_hard_reg): Honor LOCAL_REGNO in cost computation for prologue...
authorJeff Law <law@gcc.gnu.org>
Fri, 18 Mar 2011 17:05:27 +0000 (11:05 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 18 Mar 2011 17:05:27 +0000 (11:05 -0600)
* ira-color.c (assign_hard_reg): Honor LOCAL_REGNO in cost
computation for prologue/epilogue.

From-SVN: r171154

gcc/ChangeLog
gcc/ira-color.c

index 16fdd22aa162e003eb81da52978a1bcce171b2c5..200cce84e616aeb749e88b90f69f1548da8a5454 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-18  Georg-Johann Lay  <avr@gjlay.de>
+
+       * ira-color.c (assign_hard_reg): Honor LOCAL_REGNO in cost
+       computation for prologue/epilogue.
+
 2011-03-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * Makefile.in (check-consistency): Remove.
@@ -35,7 +40,7 @@
        (--with-plugin-ld): Document.
        * doc/invoke.texi (-fuse-linker-plugin): Clarify.
 
-2011-03-16  Andrew Pinski  <pinskia@gmail.com>
+2011-03-18  Andrew Pinski  <pinskia@gmail.com>
 
        PR middle-end/47790
        * expr.c (optimize_bitfield_assignment_op): Revamp to work
index 5c98ef91c2c99c475f621c436c64c7dbb01f2995..6024f7d9563d66ec2fd11d3ba8cf07b52f13e9d7 100644 (file)
@@ -591,7 +591,8 @@ assign_hard_reg (ira_allocno_t a, bool retry_p)
       full_cost = full_costs[i];
 #ifndef HONOR_REG_ALLOC_ORDER
       if (! allocated_hardreg_p[hard_regno]
-         && ira_hard_reg_not_in_set_p (hard_regno, mode, call_used_reg_set))
+         && ira_hard_reg_not_in_set_p (hard_regno, mode, call_used_reg_set)
+         && !LOCAL_REGNO (hard_regno))
        /* We need to save/restore the hard register in
           epilogue/prologue.  Therefore we increase the cost.  */
        {