From ee3f5fc0f04108d47a518ce7efadd87eb51a9cc3 Mon Sep 17 00:00:00 2001 From: hubicka Date: Thu, 10 Dec 2009 20:50:47 +0000 Subject: PR middle-end/42228 PR middle-end/42110 * cgraph.c (cgraph_create_edge_including_clones): Add old_stmt parameter; update edge if it already exists. (cgraph_remove_node): Handle correctly cases where we are removing node having clones. * cgraph.h (cgraph_create_edge_including_clones): Declare. (verify_cgraph_node): Add missing error_found = true code. (cgraph_materialize_all_clones): Remove call edges of dead nodes. * ipa.c (cgraph_remove_unreachable_nodes): Correctly look for master clone; fix double linked list removal. * tree-inline.c (copy_bb): Update cgraph_create_edge_including_clones call; fix frequency of newly created edge. * g++.dg/torture/pr42110.C: new file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155140 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-inline.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/tree-inline.c') diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 3c909419bd2..aacd903bac5 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1694,13 +1694,15 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, || !id->src_node->analyzed); if (id->transform_call_graph_edges == CB_CGE_MOVE_CLONES) cgraph_create_edge_including_clones - (id->dst_node, dest, stmt, bb->count, + (id->dst_node, dest, orig_stmt, stmt, bb->count, compute_call_stmt_bb_frequency (id->dst_node->decl, copy_basic_block), bb->loop_depth, CIF_ORIGINALLY_INDIRECT_CALL); else cgraph_create_edge (id->dst_node, dest, stmt, - bb->count, CGRAPH_FREQ_BASE, + bb->count, + compute_call_stmt_bb_frequency + (id->dst_node->decl, copy_basic_block), bb->loop_depth)->inline_failed = CIF_ORIGINALLY_INDIRECT_CALL; if (dump_file) -- cgit v1.2.1