aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-06-10 16:57:05 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2011-06-10 14:57:05 +0000
commit749f25d8a774f7786bd0258d79ee10a309df8dfb (patch)
treefb7d5174686aae02adc1c28679cbb08b775dee5e /gcc/ipa-prop.c
parent9c8cf7b70ca74485589349143ba966b8d5251215 (diff)
downloadgcc-749f25d8a774f7786bd0258d79ee10a309df8dfb.zip
gcc-749f25d8a774f7786bd0258d79ee10a309df8dfb.tar.gz
gcc-749f25d8a774f7786bd0258d79ee10a309df8dfb.tar.bz2
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
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c11
1 files changed, 6 insertions, 5 deletions
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);
}