aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 89d0d2f..8ea8ae9 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1324,7 +1324,8 @@ cgraph_edge::redirect_call_stmt_to_callee (void)
(int64_t)e->count);
gcc_assert (e2->speculative);
push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
- new_stmt = gimple_ic (e->call_stmt, dyn_cast<cgraph_node *> (ref->referred),
+ new_stmt = gimple_ic (e->call_stmt,
+ dyn_cast<cgraph_node *> (ref->referred),
e->count || e2->count
? RDIV (e->count * REG_BR_PROB_BASE,
e->count + e2->count)
@@ -1464,6 +1465,9 @@ cgraph_edge::redirect_call_stmt_to_callee (void)
update_stmt_fn (DECL_STRUCT_FUNCTION (e->caller->decl), new_stmt);
}
+ maybe_remove_unused_call_args (DECL_STRUCT_FUNCTION (e->caller->decl),
+ new_stmt);
+
e->caller->set_call_stmt_including_clones (e->call_stmt, new_stmt, false);
if (symtab->dump_file)