diff options
Diffstat (limited to 'gcc/shrink-wrap.c')
-rw-r--r-- | gcc/shrink-wrap.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c index 1a2802f..0e4ff6c 100644 --- a/gcc/shrink-wrap.c +++ b/gcc/shrink-wrap.c @@ -561,7 +561,7 @@ handle_simple_exit (edge e) BB_END (old_bb) = end; redirect_edge_succ (e, new_bb); - new_bb->frequency = EDGE_FREQUENCY (e); + new_bb->count = e->count (); e->flags |= EDGE_FALLTHRU; e = make_single_succ_edge (new_bb, EXIT_BLOCK_PTR_FOR_FN (cfun), 0); @@ -887,7 +887,7 @@ try_shrink_wrapping (edge *entry_edge, rtx_insn *prologue_seq) if (!dominated_by_p (CDI_DOMINATORS, e->src, pro)) { num += EDGE_FREQUENCY (e); - den += e->src->frequency; + den += e->src->count.to_frequency (cfun); } if (den == 0) @@ -920,8 +920,6 @@ try_shrink_wrapping (edge *entry_edge, rtx_insn *prologue_seq) if (dump_file) fprintf (dump_file, "Duplicated %d to %d\n", bb->index, dup->index); - bb->frequency = RDIV (num * bb->frequency, den); - dup->frequency -= bb->frequency; bb->count = bb->count.apply_scale (num, den); dup->count -= bb->count; } @@ -995,8 +993,7 @@ try_shrink_wrapping (edge *entry_edge, rtx_insn *prologue_seq) continue; } - new_bb->count += e->src->count.apply_probability (e->probability); - new_bb->frequency += EDGE_FREQUENCY (e); + new_bb->count += e->count (); redirect_edge_and_branch_force (e, new_bb); if (dump_file) @@ -1181,7 +1178,7 @@ place_prologue_for_one_component (unsigned int which, basic_block head) work: this does not always add up to the block frequency at all, and even if it does, rounding error makes for bad decisions. */ - SW (bb)->own_cost = bb->frequency; + SW (bb)->own_cost = bb->count.to_frequency (cfun); edge e; edge_iterator ei; |