summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.h
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.h
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.h')
-rw-r--r--gcc/ipa-prop.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h
index e442698bd3a..2dd83326018 100644
--- a/gcc/ipa-prop.h
+++ b/gcc/ipa-prop.h
@@ -287,6 +287,16 @@ ipa_check_create_edge_args (void)
cgraph_edge_max_uid + 1);
}
+/* Returns true if the array of edge infos is large enough to accomodate an
+ info for EDGE. The main purpose of this function is that debug dumping
+ function can check info availability without causing reallocations. */
+static inline bool
+ipa_edge_args_info_available_for_edge_p (struct cgraph_edge *edge)
+{
+ return ((unsigned) edge->uid < VEC_length (ipa_edge_args_t,
+ ipa_edge_args_vector));
+}
+
/* A function list element. It is used to create a temporary worklist used in
the propagation stage of IPCP. (can be used for more IPA optimizations) */
struct ipa_func_list