summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-19 11:49:36 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-19 11:49:36 +0000
commit7115ea0573bd294c444ed99fe7685b4646fa2dd6 (patch)
tree0bf93b58c18ebebe3ec5631fc8ca7271c6f036c0 /gcc/ipa-cp.c
parentb53b53b4d02d73419519acd48cfbd1123950f062 (diff)
downloadgcc-7115ea0573bd294c444ed99fe7685b4646fa2dd6.tar.gz
2010-05-19 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (ipa_print_node_jump_functions): Print jump functions also for indirect edges. Actual printing moved... (ipa_print_node_jump_functions_for_edge): ...here. (ipa_compute_jump_functions): Renamed to ipa_compute_jump_functions_for_edge and made static. (ipa_compute_jump_functions): New function. (make_edge_direct_to_target): Check if the number of arguments on the newly direct edge is the same as the number of parametrs of the callee. * ipa-cp.c (ipcp_init_stage): Most functionality moved to new ipa_compute_jump_functions. Call ipa_analyze_params_uses. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call analysis functions unconditionally, call the new ipa_analyze_params_uses on the node instead of every edge. * testsuite/g++.dg/ipa/ivinline-8.C: New test. * testsuite/gcc.dg/ipa/iinline-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159559 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index f4aab5d2d89..a1bfe0e8701 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -614,7 +614,6 @@ static void
ipcp_init_stage (void)
{
struct cgraph_node *node;
- struct cgraph_edge *cs;
for (node = cgraph_nodes; node; node = node->next)
if (node->analyzed)
@@ -623,19 +622,10 @@ ipcp_init_stage (void)
{
if (!node->analyzed)
continue;
+
+ ipa_analyze_params_uses (node);
/* building jump functions */
- for (cs = node->callees; cs; cs = cs->next_callee)
- {
- /* 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 && !flag_whopr)
- continue;
- ipa_count_arguments (cs);
- 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_compute_jump_functions (cs);
- }
+ ipa_compute_jump_functions (node);
}
}