aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-12-10 21:50:47 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2009-12-10 20:50:47 +0000
commit47cb0d7da16c57888fdc04437530d86f33ee3c1b (patch)
tree4b7897c70e32ed3a7ade0ed23cc48ffbcd023f09 /gcc/tree-inline.c
parent604df1167c464da3710e28270e6561d427df0444 (diff)
downloadgcc-47cb0d7da16c57888fdc04437530d86f33ee3c1b.zip
gcc-47cb0d7da16c57888fdc04437530d86f33ee3c1b.tar.gz
gcc-47cb0d7da16c57888fdc04437530d86f33ee3c1b.tar.bz2
re PR middle-end/42228 (verify_cgraph_node failed:node has wrong clone_of)
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. From-SVN: r155140
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 3c90941..aacd903 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)