summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-29 16:41:35 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-29 16:41:35 +0000
commit11b73810a1c6d07ba5957a462549785a6c9165ea (patch)
tree9296bef7d6851c797bb4189695298388ef9bef1d /gcc/cgraph.c
parenta65f4f8eec224427fa4214b20d57e96c9043ef1f (diff)
downloadgcc-11b73810a1c6d07ba5957a462549785a6c9165ea.tar.gz
* cgraph.c (cgraph_remove_node): Do not remove nested nodes.
* cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139772 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index a0db5860f39..fdc156dfe33 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -857,6 +857,7 @@ cgraph_remove_node (struct cgraph_node *node)
{
void **slot;
bool kill_body = false;
+ struct cgraph_node *n;
cgraph_call_node_removal_hooks (node);
cgraph_node_remove_callers (node);
@@ -865,8 +866,9 @@ cgraph_remove_node (struct cgraph_node *node)
/* Incremental inlining access removed nodes stored in the postorder list.
*/
node->needed = node->reachable = false;
- while (node->nested)
- cgraph_remove_node (node->nested);
+ for (n = node->nested; n; n = n->next_nested)
+ n->origin = NULL;
+ node->nested = NULL;
if (node->origin)
{
struct cgraph_node **node2 = &node->origin->nested;