From 749f25d8a774f7786bd0258d79ee10a309df8dfb Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 10 Jun 2011 16:57:05 +0200 Subject: ipa-cp.c (ipcp_versionable_function_p): Aliases are not versionable. * ipa-cp.c (ipcp_versionable_function_p): Aliases are not versionable. (ipcp_cloning_candidate_p): Aliases are not clonning candidates. (ipcp_initialize_node_lattices): We don't propagate through an aliases. (ipcp_propagate_stage): Skip aliases when propagating. (ipcp_need_redirect_p): Skip aliases. (ipcp_insert_stage): Use FOR_EACH_FUNCTION_WITH_GIMPLE_BODY and collect_callers_of_node. * ipa-prop.c (ipa_init_func_list): Do not analyze datastructures for aliases. (ipa_compute_jump_functions): Look through aliases. From-SVN: r174911 --- gcc/ipa-prop.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gcc/ipa-prop.c') diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 7e74ac8..6450e81 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -93,7 +93,7 @@ ipa_init_func_list (void) wl = NULL; for (node = cgraph_nodes; node; node = node->next) - if (node->analyzed) + if (node->analyzed && !node->alias) { struct ipa_node_params *info = IPA_NODE_REF (node); /* Unreachable nodes should have been eliminated before ipcp and @@ -1096,6 +1096,7 @@ ipa_compute_jump_functions (struct cgraph_node *node, for (cs = node->callees; cs; cs = cs->next_callee) { + struct cgraph_node *callee = cgraph_function_or_thunk_node (cs->callee, NULL); /* We do not need to bother analyzing calls to unknown functions unless they may become known during lto/whopr. */ if (!cs->callee->analyzed && !flag_lto) @@ -1103,11 +1104,11 @@ ipa_compute_jump_functions (struct cgraph_node *node, ipa_count_arguments (cs); /* If the descriptor of the callee is not initialized yet, we have to do it now. */ - if (cs->callee->analyzed) - ipa_initialize_node_params (cs->callee); + if (callee->analyzed) + ipa_initialize_node_params (callee); if (ipa_get_cs_argument_count (IPA_EDGE_REF (cs)) - != ipa_get_param_count (IPA_NODE_REF (cs->callee))) - ipa_set_called_with_variable_arg (IPA_NODE_REF (cs->callee)); + != ipa_get_param_count (IPA_NODE_REF (callee))) + ipa_set_called_with_variable_arg (IPA_NODE_REF (callee)); ipa_compute_jump_functions_for_edge (parms_info, cs); } -- cgit v1.1