Mercurial > hg > CbC > CbC_gcc
comparison gcc/ira-color.c @ 19:58ad6c70ea60
update gcc from 4.4.0 to 4.4.1.
author | kent@firefly.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Thu, 24 Sep 2009 13:21:57 +0900 |
parents | a06113de4d67 |
children | 77e2b8dfacca |
comparison
equal
deleted
inserted
replaced
18:33936f7f2835 | 19:58ad6c70ea60 |
---|---|
283 if (! ira_reg_classes_intersect_p[rclass][cover_class] | 283 if (! ira_reg_classes_intersect_p[rclass][cover_class] |
284 || ALLOCNO_ASSIGNED_P (another_allocno)) | 284 || ALLOCNO_ASSIGNED_P (another_allocno)) |
285 continue; | 285 continue; |
286 | 286 |
287 cost = (cp->second == allocno | 287 cost = (cp->second == allocno |
288 ? ira_register_move_cost[mode][rclass][cover_class] | 288 ? ira_get_register_move_cost (mode, rclass, cover_class) |
289 : ira_register_move_cost[mode][cover_class][rclass]); | 289 : ira_get_register_move_cost (mode, cover_class, rclass)); |
290 if (decr_p) | 290 if (decr_p) |
291 cost = -cost; | 291 cost = -cost; |
292 | 292 |
293 update_cost = cp->freq * cost / divisor; | 293 update_cost = cp->freq * cost / divisor; |
294 if (update_cost == 0) | 294 if (update_cost == 0) |
1067 else | 1067 else |
1068 cost += ((ira_memory_move_cost[mode][rclass][1] | 1068 cost += ((ira_memory_move_cost[mode][rclass][1] |
1069 * ira_loop_edge_freq (loop_node, regno, true) | 1069 * ira_loop_edge_freq (loop_node, regno, true) |
1070 + ira_memory_move_cost[mode][rclass][0] | 1070 + ira_memory_move_cost[mode][rclass][0] |
1071 * ira_loop_edge_freq (loop_node, regno, false)) | 1071 * ira_loop_edge_freq (loop_node, regno, false)) |
1072 - (ira_register_move_cost[mode][rclass][rclass] | 1072 - (ira_get_register_move_cost (mode, rclass, rclass) |
1073 * (ira_loop_edge_freq (loop_node, regno, false) | 1073 * (ira_loop_edge_freq (loop_node, regno, false) |
1074 + ira_loop_edge_freq (loop_node, regno, true)))); | 1074 + ira_loop_edge_freq (loop_node, regno, true)))); |
1075 return cost; | 1075 return cost; |
1076 } | 1076 } |
1077 | 1077 |
2035 + (ira_memory_move_cost[mode][rclass][0] * exit_freq)); | 2035 + (ira_memory_move_cost[mode][rclass][0] * exit_freq)); |
2036 } | 2036 } |
2037 else | 2037 else |
2038 { | 2038 { |
2039 cover_class = ALLOCNO_COVER_CLASS (subloop_allocno); | 2039 cover_class = ALLOCNO_COVER_CLASS (subloop_allocno); |
2040 cost = (ira_register_move_cost[mode][rclass][rclass] | 2040 cost = (ira_get_register_move_cost (mode, rclass, rclass) |
2041 * (exit_freq + enter_freq)); | 2041 * (exit_freq + enter_freq)); |
2042 ira_allocate_and_set_or_copy_costs | 2042 ira_allocate_and_set_or_copy_costs |
2043 (&ALLOCNO_UPDATED_HARD_REG_COSTS (subloop_allocno), cover_class, | 2043 (&ALLOCNO_UPDATED_HARD_REG_COSTS (subloop_allocno), cover_class, |
2044 ALLOCNO_UPDATED_COVER_CLASS_COST (subloop_allocno), | 2044 ALLOCNO_UPDATED_COVER_CLASS_COST (subloop_allocno), |
2045 ALLOCNO_HARD_REG_COSTS (subloop_allocno)); | 2045 ALLOCNO_HARD_REG_COSTS (subloop_allocno)); |
2160 { | 2160 { |
2161 cost | 2161 cost |
2162 += (ira_memory_move_cost[mode][rclass][0] * exit_freq | 2162 += (ira_memory_move_cost[mode][rclass][0] * exit_freq |
2163 + ira_memory_move_cost[mode][rclass][1] * enter_freq); | 2163 + ira_memory_move_cost[mode][rclass][1] * enter_freq); |
2164 if (hard_regno2 != hard_regno) | 2164 if (hard_regno2 != hard_regno) |
2165 cost -= (ira_register_move_cost[mode][rclass][rclass] | 2165 cost -= (ira_get_register_move_cost (mode, rclass, rclass) |
2166 * (exit_freq + enter_freq)); | 2166 * (exit_freq + enter_freq)); |
2167 } | 2167 } |
2168 } | 2168 } |
2169 if ((parent = loop_node->parent) != NULL | 2169 if ((parent = loop_node->parent) != NULL |
2170 && (parent_allocno = parent->regno_allocno_map[regno]) != NULL) | 2170 && (parent_allocno = parent->regno_allocno_map[regno]) != NULL) |
2179 { | 2179 { |
2180 cost | 2180 cost |
2181 += (ira_memory_move_cost[mode][rclass][1] * exit_freq | 2181 += (ira_memory_move_cost[mode][rclass][1] * exit_freq |
2182 + ira_memory_move_cost[mode][rclass][0] * enter_freq); | 2182 + ira_memory_move_cost[mode][rclass][0] * enter_freq); |
2183 if (hard_regno2 != hard_regno) | 2183 if (hard_regno2 != hard_regno) |
2184 cost -= (ira_register_move_cost[mode][rclass][rclass] | 2184 cost -= (ira_get_register_move_cost (mode, rclass, rclass) |
2185 * (exit_freq + enter_freq)); | 2185 * (exit_freq + enter_freq)); |
2186 } | 2186 } |
2187 } | 2187 } |
2188 if (cost < 0) | 2188 if (cost < 0) |
2189 { | 2189 { |
2245 rclass = REGNO_REG_CLASS (hard_regno); | 2245 rclass = REGNO_REG_CLASS (hard_regno); |
2246 i = ira_class_hard_reg_index[cover_class][hard_regno]; | 2246 i = ira_class_hard_reg_index[cover_class][hard_regno]; |
2247 if (i < 0) | 2247 if (i < 0) |
2248 continue; | 2248 continue; |
2249 cost = (cp->first == a | 2249 cost = (cp->first == a |
2250 ? ira_register_move_cost[mode][rclass][cover_class] | 2250 ? ira_get_register_move_cost (mode, rclass, cover_class) |
2251 : ira_register_move_cost[mode][cover_class][rclass]); | 2251 : ira_get_register_move_cost (mode, cover_class, rclass)); |
2252 ira_allocate_and_set_or_copy_costs | 2252 ira_allocate_and_set_or_copy_costs |
2253 (&ALLOCNO_UPDATED_HARD_REG_COSTS (a), | 2253 (&ALLOCNO_UPDATED_HARD_REG_COSTS (a), |
2254 cover_class, ALLOCNO_COVER_CLASS_COST (a), | 2254 cover_class, ALLOCNO_COVER_CLASS_COST (a), |
2255 ALLOCNO_HARD_REG_COSTS (a)); | 2255 ALLOCNO_HARD_REG_COSTS (a)); |
2256 ira_allocate_and_set_or_copy_costs | 2256 ira_allocate_and_set_or_copy_costs |