From 2a3d7659c5a172e3c7435c4018e8ee927330b3d3 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 18 Mar 2011 11:05:27 -0600 Subject: [PATCH] ira-color.c (assign_hard_reg): Honor LOCAL_REGNO in cost computation for prologue/epilogue. * ira-color.c (assign_hard_reg): Honor LOCAL_REGNO in cost computation for prologue/epilogue. From-SVN: r171154 --- gcc/ChangeLog | 7 ++++++- gcc/ira-color.c | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 16fdd22aa16..200cce84e61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-03-18 Georg-Johann Lay + + * ira-color.c (assign_hard_reg): Honor LOCAL_REGNO in cost + computation for prologue/epilogue. + 2011-03-18 Rainer Orth * 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 +2011-03-18 Andrew Pinski PR middle-end/47790 * expr.c (optimize_bitfield_assignment_op): Revamp to work diff --git a/gcc/ira-color.c b/gcc/ira-color.c index 5c98ef91c2c..6024f7d9563 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -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. */ { -- 2.30.2