possibly on CRITICAL edge and in HOT basic block. */
static inline int
-coalesce_cost (int frequency, bool hot, bool critical)
+coalesce_cost (int frequency, bool optimize_for_size, bool critical)
{
/* Base costs on BB frequencies bounded by 1. */
int cost = frequency;
if (!cost)
cost = 1;
- if (optimize_size)
+ if (optimize_for_size)
cost = 1;
- else
- /* It is more important to coalesce in HOT blocks. */
- if (hot)
- cost *= 2;
/* Inserting copy on critical edge costs more than inserting it elsewhere. */
if (critical)
static inline int
coalesce_cost_bb (basic_block bb)
{
- return coalesce_cost (bb->frequency, maybe_hot_bb_p (bb), false);
+ return coalesce_cost (bb->frequency, optimize_bb_for_size_p (bb), false);
}
return MUST_COALESCE_COST;
return coalesce_cost (EDGE_FREQUENCY (e),
- maybe_hot_edge_p (e),
+ optimize_edge_for_size_p (e),
EDGE_CRITICAL_P (e));
}
if (SSA_NAME_VAR (outputs[match]) == SSA_NAME_VAR (input))
{
cost = coalesce_cost (REG_BR_PROB_BASE,
- maybe_hot_bb_p (bb),
+ optimize_bb_for_size_p (bb),
false);
add_coalesce (cl, v1, v2, cost);
bitmap_set_bit (used_in_copy, v1);