diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-05 17:19:35 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-05 17:19:35 +0000 |
commit | 648f8fc59b2cc39abd24f4c22388b346cdebcc31 (patch) | |
tree | 3a07eccc4c22b265261edd75c9ec3910d9c626f5 /gcc/tree-tailcall.c | |
parent | 7bef5b82e4109778a0988d20e19e1ed29dadd835 (diff) | |
parent | 8c089b5c15a7b35644750ca393f1e66071ad9aa9 (diff) | |
download | gcc-648f8fc59b2cc39abd24f4c22388b346cdebcc31.tar.gz |
Merge trunk into sve
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r-- | gcc/tree-tailcall.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index c4b8cee4d27..0e637147e8c 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -805,20 +805,14 @@ adjust_return_value (basic_block bb, tree m, tree a) /* Subtract COUNT and FREQUENCY from the basic block and it's outgoing edge. */ static void -decrease_profile (basic_block bb, profile_count count, int frequency) +decrease_profile (basic_block bb, profile_count count) { - edge e; bb->count = bb->count - count; - bb->frequency -= frequency; - if (bb->frequency < 0) - bb->frequency = 0; if (!single_succ_p (bb)) { gcc_assert (!EDGE_COUNT (bb->succs)); return; } - e = single_succ_edge (bb); - e->count -= count; } /* Returns true if argument PARAM of the tail recursive call needs to be copied @@ -895,11 +889,10 @@ eliminate_tail_call (struct tailcall *t) /* Number of executions of function has reduced by the tailcall. */ e = single_succ_edge (gsi_bb (t->call_gsi)); - decrease_profile (EXIT_BLOCK_PTR_FOR_FN (cfun), e->count, EDGE_FREQUENCY (e)); - decrease_profile (ENTRY_BLOCK_PTR_FOR_FN (cfun), e->count, - EDGE_FREQUENCY (e)); + decrease_profile (EXIT_BLOCK_PTR_FOR_FN (cfun), e->count ()); + decrease_profile (ENTRY_BLOCK_PTR_FOR_FN (cfun), e->count ()); if (e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun)) - decrease_profile (e->dest, e->count, EDGE_FREQUENCY (e)); + decrease_profile (e->dest, e->count ()); /* Replace the call by a jump to the start of function. */ e = redirect_edge_and_branch (single_succ_edge (gsi_bb (t->call_gsi)), |