diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-02 15:37:38 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-02 15:37:38 +0000 |
commit | 03f99d3c9c661055b5308b39a6939ae8598f604f (patch) | |
tree | c5080ee359d717b439069963cb722bd18f086222 /gcc/ipa-prop.c | |
parent | d6b19f6bc6c71621f8c894b07706e14e1301cb39 (diff) | |
download | gcc-03f99d3c9c661055b5308b39a6939ae8598f604f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178485 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index f21ab893995..5c0bd90c16b 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)); - } } - |