aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-tailcall.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r--gcc/tree-tailcall.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 9bcd1d6..0e63714 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -805,12 +805,9 @@ 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)
{
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));
@@ -892,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)),