}
/* Call all node duplication hooks. */
-static void
+void
cgraph_call_node_duplication_hooks (struct cgraph_node *node1,
struct cgraph_node *node2)
{
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)
+ 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);
}
fprintf (f, " only_called_at_exit");
else if (node->alias)
fprintf (f, " alias");
+ if (node->tm_clone)
+ fprintf (f, " tm_clone");
fprintf (f, "\n");
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. */