aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2011-09-02 17:37:38 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2011-09-02 17:37:38 +0200
commitd7da5cc85cdef4207d10e8b79dce79ed12353fb9 (patch)
treec5080ee359d717b439069963cb722bd18f086222 /gcc/ipa-prop.c
parente9e1d143b5ea00f99191cd0e65c09ee972ebcedb (diff)
downloadgcc-d7da5cc85cdef4207d10e8b79dce79ed12353fb9.zip
gcc-d7da5cc85cdef4207d10e8b79dce79ed12353fb9.tar.gz
gcc-d7da5cc85cdef4207d10e8b79dce79ed12353fb9.tar.bz2
ipa-prop.h (ipa_node_params): Removed fields called_with_var_arguments and node_versionable.
2011-09-02 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (ipa_node_params): Removed fields called_with_var_arguments and node_versionable. (ipa_set_called_with_variable_arg): Removed. (ipa_is_called_with_var_arguments): Likewise. * ipa-cp.c (ipa_get_lattice): Fixed index check in an assert. (determine_versionability): Do not check for type attributes and va builtins. Record versionability into inline summary. (initialize_node_lattices): Do not check ipa_is_called_with_var_arguments. (propagate_constants_accross_call): Likewise, ignore arguments we do not have PARM_DECLs for, set variable flag for parameters that were not passed a value. (create_specialized_node): Dump info that we cannot change signature. * ipa-prop.c (ipa_compute_jump_functions): Do not care about variable number of arguments. (ipa_make_edge_direct_to_target): Likewise. (ipa_update_after_lto_read): Likewise. (ipa_node_duplication_hook): Do not copy called_with_var_arguments flag. * tree-inline.c (copy_arguments_for_versioning): Copy PARM_DECLs if they were remapped. * testsuite/gcc.dg/ipa/ipcp-3.c: New test. From-SVN: r178485
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index f21ab89..5c0bd90 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -1032,19 +1032,13 @@ 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);
+ 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)
+ if (!callee->analyzed && !flag_lto)
continue;
ipa_count_arguments (cs);
- /* If the descriptor of the callee is not initialized yet, we have to do
- it now. */
- 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 (callee)))
- ipa_set_called_with_variable_arg (IPA_NODE_REF (callee));
ipa_compute_jump_functions_for_edge (parms_info, cs);
}
@@ -1649,10 +1643,6 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target)
}
callee = cgraph_function_or_thunk_node (callee, NULL);
- if (ipa_get_cs_argument_count (IPA_EDGE_REF (ie))
- != ipa_get_param_count (IPA_NODE_REF (callee)))
- ipa_set_called_with_variable_arg (IPA_NODE_REF (callee));
-
return ie;
}
@@ -1964,7 +1954,6 @@ ipa_node_duplication_hook (struct cgraph_node *src, struct cgraph_node *dst,
new_info->lattices = NULL;
new_info->ipcp_orig_node = old_info->ipcp_orig_node;
- new_info->called_with_var_arguments = old_info->called_with_var_arguments;
new_info->uses_analysis_done = old_info->uses_analysis_done;
new_info->node_enqueued = old_info->node_enqueued;
}
@@ -2949,7 +2938,6 @@ void
ipa_update_after_lto_read (void)
{
struct cgraph_node *node;
- struct cgraph_edge *cs;
ipa_check_create_node_params ();
ipa_check_create_edge_args ();
@@ -2957,17 +2945,4 @@ ipa_update_after_lto_read (void)
for (node = cgraph_nodes; node; node = node->next)
if (node->analyzed)
ipa_initialize_node_params (node);
-
- for (node = cgraph_nodes; node; node = node->next)
- if (node->analyzed)
- for (cs = node->callees; cs; cs = cs->next_callee)
- {
- struct cgraph_node *callee;
-
- callee = cgraph_function_or_thunk_node (cs->callee, NULL);
- if (ipa_get_cs_argument_count (IPA_EDGE_REF (cs))
- != ipa_get_param_count (IPA_NODE_REF (callee)))
- ipa_set_called_with_variable_arg (IPA_NODE_REF (callee));
- }
}
-