aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index c764a44..597addb 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2215,7 +2215,7 @@ update_ssa_across_abnormal_edges (basic_block bb, basic_block ret_bb,
debug stmts are left after a statement that must end the basic block. */
static bool
-copy_edges_for_bb (basic_block bb, profile_count num, profile_count den,
+copy_edges_for_bb (basic_block bb,
basic_block ret_bb, basic_block abnormal_goto_dest)
{
basic_block new_bb = (basic_block) bb->aux;
@@ -2224,8 +2224,6 @@ copy_edges_for_bb (basic_block bb, profile_count num, profile_count den,
gimple_stmt_iterator si;
int flags;
bool need_debug_cleanup = false;
- bool scale = num.initialized_p ()
- && (den > 0 || num == profile_count::zero ());
/* Use the indices from the original blocks to create edges for the
new ones. */
@@ -2242,8 +2240,6 @@ copy_edges_for_bb (basic_block bb, profile_count num, profile_count den,
&& old_edge->dest->aux != EXIT_BLOCK_PTR_FOR_FN (cfun))
flags |= EDGE_FALLTHRU;
new_edge = make_edge (new_bb, (basic_block) old_edge->dest->aux, flags);
- if (scale)
- new_edge->count = old_edge->count.apply_scale (num, den);
new_edge->probability = old_edge->probability;
}
@@ -2324,17 +2320,11 @@ copy_edges_for_bb (basic_block bb, profile_count num, profile_count den,
&& (e = find_edge (copy_stmt_bb,
(basic_block) old_edge->dest->aux))
&& (e->flags & EDGE_EH))
- {
- e->probability = old_edge->probability;
- e->count = old_edge->count;
- }
+ e->probability = old_edge->probability;
FOR_EACH_EDGE (e, ei, copy_stmt_bb->succs)
if ((e->flags & EDGE_EH) && !e->probability.initialized_p ())
- {
- e->probability = profile_probability::never ();
- e->count = profile_count::zero ();
- }
+ e->probability = profile_probability::never ();
}
@@ -2700,16 +2690,10 @@ void
freqs_to_counts (struct cgraph_node *node, profile_count count)
{
basic_block bb;
- edge_iterator ei;
- edge e;
struct function *fn = DECL_STRUCT_FUNCTION (node->decl);
FOR_ALL_BB_FN(bb, fn)
- {
- bb->count = count.apply_scale (bb->frequency, BB_FREQ_MAX);
- FOR_EACH_EDGE (e, ei, bb->succs)
- e->count = e->src->count.apply_probability (e->probability);
- }
+ bb->count = count.apply_scale (bb->frequency, BB_FREQ_MAX);
}
/* Make a copy of the body of FN so that it can be inserted inline in
@@ -2769,10 +2753,7 @@ copy_cfg_body (copy_body_data * id, profile_count count, int frequency_scale,
FOR_EACH_EDGE (e, ei, new_entry->preds)
if (!e->src->aux)
- {
- incoming_frequency += EDGE_FREQUENCY (e);
- incoming_count += e->count;
- }
+ incoming_frequency += EDGE_FREQUENCY (e);
if (scale)
incoming_count = incoming_count.apply_scale (num, den);
else
@@ -2826,14 +2807,13 @@ copy_cfg_body (copy_body_data * id, profile_count count, int frequency_scale,
FOR_ALL_BB_FN (bb, cfun_to_copy)
if (!id->blocks_to_copy
|| (bb->index > 0 && bitmap_bit_p (id->blocks_to_copy, bb->index)))
- need_debug_cleanup |= copy_edges_for_bb (bb, num, den, exit_block_map,
+ need_debug_cleanup |= copy_edges_for_bb (bb, exit_block_map,
abnormal_goto_dest);
if (new_entry)
{
edge e = make_edge (entry_block_map, (basic_block)new_entry->aux, EDGE_FALLTHRU);
e->probability = profile_probability::always ();
- e->count = incoming_count;
}
/* Duplicate the loop tree, if available and wanted. */