diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-10 20:50:47 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-10 20:50:47 +0000 |
commit | ee3f5fc0f04108d47a518ce7efadd87eb51a9cc3 (patch) | |
tree | 4b7897c70e32ed3a7ade0ed23cc48ffbcd023f09 /gcc/tree-inline.c | |
parent | 0c54ae75e67742522f331dce5db1fe0983d42ca6 (diff) | |
download | gcc-ee3f5fc0f04108d47a518ce7efadd87eb51a9cc3.tar.gz |
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
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) |