From 8df22c5c10b38f208d36041f2918ac6a535d7fe2 Mon Sep 17 00:00:00 2001 From: hubicka Date: Mon, 21 Aug 2006 01:42:39 +0000 Subject: PR rtl-optimization/28071 * tree-optimize.c (tree_rest_of_compilation): Do not remove edges twice. * tree-inline.c (copy_bb): Use cgraph_set_call_stmt. * ipa-inline.c (cgraph_check_inline_limits): Add one_only argument. (cgraph_decide_inlining, cgraph_decide_inlining_of_small_function, cgraph_decide_inlining_incrementally): Update use of cgraph_check_inline_limits. * cgraph.c (edge_hash, edge_eq): New function. (cgraph_edge, cgraph_set_call_stmt, cgraph_create_edge, cgraph_edge_remove_caller, cgraph_node_remove_callees, cgraph_remove_node): Maintain call site hash. * cgraph.h (struct cgraph_node): Add call_site_hash. (cgraph_set_call_stmt): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116284 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-optimize.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gcc/tree-optimize.c') diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index fdf8ca1c46b..3f4471a468c 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -393,15 +393,14 @@ tree_rest_of_compilation (tree fndecl) timevar_pop (TV_INTEGRATION); } } - /* We are not going to maintain the cgraph edges up to date. - Kill it so it won't confuse us. */ - while (node->callees) + /* In non-unit-at-a-time we must mark all referenced functions as needed. + */ + if (!flag_unit_at_a_time) { - /* In non-unit-at-a-time we must mark all referenced functions as needed. - */ - if (node->callees->callee->analyzed && !flag_unit_at_a_time) - cgraph_mark_needed_node (node->callees->callee); - cgraph_remove_edge (node->callees); + struct cgraph_edge *e; + for (e = node->callees; e; e = e->next_callee) + if (e->callee->analyzed) + cgraph_mark_needed_node (e->callee); } /* We are not going to maintain the cgraph edges up to date. -- cgit v1.2.1