summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-17 13:23:32 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-17 13:23:32 +0000
commit86c96e3a40e9600d6e9e5fd87dac5afb55961eaf (patch)
treefbd54fb05da1736f1ad2c36f9e38e2f0ad726075 /gcc/ipa-prop.c
parent19f42ddfb72faef8a936fbfe4d700aa0871794c1 (diff)
downloadgcc-86c96e3a40e9600d6e9e5fd87dac5afb55961eaf.tar.gz
2008-07-17 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (ipcp_print_all_lattices): New variable info, check that nodes are relevant by examining the node->analyzed flag. (ipcp_init_stage): Check which nodes are relevant, assert that the relevant ones are also required. (ipcp_propagate_stage): Check on the side arrays are properly allocated. (ipcp_print_all_jump_functions): Make sure not to touch any node that is not analyzed or an edge that does not have a corresponding entry in the on-the-side vectors. (ipcp_function_scale_print): Likewise. (ipcp_update_callgraph): Check that the node is relevant. (ipcp_insert_stage): Check that the node is relevant. Check there is an info for every node and edge. * ipa-prop.c (ipa_init_func_list): Check the nodes are relevant. (ipa_print_all_tree_maps): Likewise and a new variable info. (ipa_print_all_params_modified): Likewise. * ipa-prop.h (ipa_edge_args_info_available_for_edge_p): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137921 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index f67d6579e10..ff833d77f23 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -53,7 +53,13 @@ ipa_init_func_list (void)
wl = NULL;
for (node = cgraph_nodes; node; node = node->next)
- ipa_push_func_to_list (&wl, node);
+ if (node->analyzed)
+ {
+ /* Unreachable nodes should have been eliminated before ipcp and
+ inlining. */
+ gcc_assert (node->needed || node->reachable);
+ ipa_push_func_to_list (&wl, node);
+ }
return wl;
}
@@ -521,7 +527,11 @@ ipa_print_all_tree_maps (FILE * f)
fprintf (f, "\nPARAM TREE MAP PRINT\n");
for (node = cgraph_nodes; node; node = node->next)
{
- struct ipa_node_params *info = IPA_NODE_REF (node);
+ struct ipa_node_params *info;
+
+ if (!node->analyzed)
+ continue;
+ info = IPA_NODE_REF (node);
fprintf (f, "function %s Trees :: \n", cgraph_node_name (node));
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
@@ -547,7 +557,11 @@ ipa_print_all_params_modified (FILE * f)
fprintf (f, "\nMODIFY PRINT\n");
for (node = cgraph_nodes; node; node = node->next)
{
- struct ipa_node_params *info = IPA_NODE_REF (node);
+ struct ipa_node_params *info;
+
+ if (!node->analyzed)
+ continue;
+ info = IPA_NODE_REF (node);
fprintf (f, "function %s :: \n", cgraph_node_name (node));
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)