Fix IRA_HARD_REGNO_ADD_COST_MULTIPLIER in ira_tune_allocno_costs
authorTom de Vries <tom@codesourcery.com>
Sat, 6 Sep 2014 08:08:36 +0000 (08:08 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Sat, 6 Sep 2014 08:08:36 +0000 (08:08 +0000)
2014-09-06  Tom de Vries  <tom@codesourcery.com>

* 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

gcc/ChangeLog
gcc/ira-costs.c

index a8ef78a16dd60963bbf73b90b03b93777fbd13c0..97408f1ee11b34dd0f06f4d554e45bdff9a956d0 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-06  Tom de Vries  <tom@codesourcery.com>
+
+       * 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  <dominiq@lps.ens.fr>
 
        PR target/63188
index 774a958e353c996281dbde3b38d4ad2386672545..57239f5b19b28cb8f70067ef58dd871616f771c3 100644 (file)
@@ -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