edge->can_throw_external
= call_stmt ? stmt_can_throw_external (call_stmt) : false;
pop_cfun ();
- edge->call_stmt_cannot_inline_p =
- (call_stmt ? gimple_call_cannot_inline_p (call_stmt) : false);
+ if (call_stmt
+ && callee && callee->decl
+ && !gimple_check_call_matching_types (call_stmt, callee->decl))
+ edge->call_stmt_cannot_inline_p = true;
+ else
+ edge->call_stmt_cannot_inline_p = false;
if (call_stmt && caller->call_site_hash)
cgraph_add_edge_to_call_site_hash (edge);
/* Insert to callers list of the new callee. */
cgraph_set_edge_callee (edge, callee);
- if (edge->call_stmt
- && !gimple_check_call_matching_types (edge->call_stmt, callee->decl))
- {
- gimple_call_set_cannot_inline (edge->call_stmt, true);
- edge->call_stmt_cannot_inline_p = true;
- }
+ if (edge->call_stmt)
+ edge->call_stmt_cannot_inline_p
+ = !gimple_check_call_matching_types (edge->call_stmt, callee->decl);
/* We need to re-determine the inlining status of the edge. */
initialize_inline_failed (edge);
if (!args_to_skip)
new_decl = copy_node (old_decl);
else
- new_decl = build_function_decl_skip_args (old_decl, args_to_skip);
+ new_decl = build_function_decl_skip_args (old_decl, args_to_skip, false);
DECL_STRUCT_FUNCTION (new_decl) = NULL;
/* Generate a new name for the new version. */