From: Tom de Vries Date: Sat, 6 Sep 2014 08:08:36 +0000 (+0000) Subject: Fix IRA_HARD_REGNO_ADD_COST_MULTIPLIER in ira_tune_allocno_costs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=811e4f15d616e4501d5beff25075bfea57a2f1aa;p=gcc.git Fix IRA_HARD_REGNO_ADD_COST_MULTIPLIER in ira_tune_allocno_costs 2014-09-06 Tom de Vries * ira-costs.c (ira_tune_allocno_costs): Don't conditionalize IRA_HARD_REGNO_ADD_COST_MULTIPLIER code on ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS. From-SVN: r214988 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8ef78a16dd..97408f1ee11 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-09-06 Tom de Vries + + * ira-costs.c (ira_tune_allocno_costs): Don't conditionalize + IRA_HARD_REGNO_ADD_COST_MULTIPLIER code on + ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS. + 2014-09-05 Dominique Dhumieres PR target/63188 diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index 774a958e353..57239f5b19b 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -2217,21 +2217,19 @@ ira_tune_allocno_costs (void) crossed_calls_clobber_regs = &(ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS (a)); if (ira_hard_reg_set_intersection_p (regno, mode, - *crossed_calls_clobber_regs)) - { - if (ira_hard_reg_set_intersection_p (regno, mode, + *crossed_calls_clobber_regs) + && (ira_hard_reg_set_intersection_p (regno, mode, call_used_reg_set) - || HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) - cost += (ALLOCNO_CALL_FREQ (a) - * (ira_memory_move_cost[mode][rclass][0] - + ira_memory_move_cost[mode][rclass][1])); + || HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + cost += (ALLOCNO_CALL_FREQ (a) + * (ira_memory_move_cost[mode][rclass][0] + + ira_memory_move_cost[mode][rclass][1])); #ifdef IRA_HARD_REGNO_ADD_COST_MULTIPLIER - cost += ((ira_memory_move_cost[mode][rclass][0] - + ira_memory_move_cost[mode][rclass][1]) - * ALLOCNO_FREQ (a) - * IRA_HARD_REGNO_ADD_COST_MULTIPLIER (regno) / 2); + cost += ((ira_memory_move_cost[mode][rclass][0] + + ira_memory_move_cost[mode][rclass][1]) + * ALLOCNO_FREQ (a) + * IRA_HARD_REGNO_ADD_COST_MULTIPLIER (regno) / 2); #endif - } if (INT_MAX - cost < reg_costs[j]) reg_costs[j] = INT_MAX; else