aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-04-16 12:04:17 +0000
committerJan Hubicka <jh@suse.cz>2012-04-16 12:04:17 +0000
commit6fe40f90c7ce5fec49dc6af7404ac3e94387ae04 (patch)
tree011c878ee2a5ec6071bdb8be9c3d3d3fc62db1a9 /gcc/cgraph.h
parenta386bd0e2f7e59e408568f268e292ee19de7053f (diff)
* cgraph.h (FOR_EACH_VARIABLE, FOR_EACH_VARIABLE, FOR_EACH_FUNCTION):
New macros. * lto-symtab.c (lto_symtab_merge_cgraph_nodes): Use FOR_EACH walkers to walk cgraph and varpool. * cgraph.c (cgraph_node_for_asm): Likewise. (dump_cgraph): Likewise. * value-prof.c (init_node_map): Likewise. * tree.c (free_lang_data_in_cgraph): Likewise. * tree-emutls.c: (ipa_lower_emutls): Likewise. * ipa-reference.c (generate_summary, propagate): Likewise. * cgraphunit.c (verify_cgraph, cgraph_process_same_body_aliases, cgraph_mark_functions_to_output, cgraph_output_in_order, output_weakrefs, cgraph_materialize_all_clones, cgraph_optimize): Likewise. * lto-cgraph.c (merge_profile_summaries): Likewise. (input_cgraph): Likewise. * ipa-pure-const.c (generate_summary): Likewise. (propagate): Likwise. * ipa-utils.c (ipa_reduced_postorder): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reverse_postorder): Likewise. * ipa-inline.c (ipa_inline): Likewise. * matrix-reorg.c (find_matrices_decl): Likewise. (matrix_reorg): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * ipa.c (cgraph_remove_unreachable_nodes): Likewise. (function_and_variable_visibility): Likewise. (whole_program_function_and_variable_visibility): Likewise. (ipa_cdtor_merge): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. * ipa-inline-analysis.c (dump_inline_summaries): Likewise. * ipa-prop.c (ipa_print_all_jump_functions): Likewise. (ipa_print_all_params): Likewise. (ipa_update_after_lto_read): Likewise. * tree-profie.c (tree_profiling): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. * passes.c (dump_passes): Likewise. (do_per_function): Likewise. (ipa_write_summaries): Likewise. * varpool.c (dump_varpool): Likewise. (varpool_node_for_asm): Likewise. (varpool_assemble_pending_decls): Likewise. * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH walkers to walk cgraph and varpool. * lto.c (read_cgraph_and_symbols): Use FOR_EACH walkers to walk cgraph and varpool. (materialize_cgraph): Likewise. * lto-partition.c (lto_1_to_1_map): Likewise. (lto_balanced_map): Likewise. (lto_promote_cross_file_statics): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@186492 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index d5d9eb07ad3..e4c7b2a613c 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -773,6 +773,12 @@ varpool_next_static_initializer (struct varpool_node *node)
#define FOR_EACH_STATIC_INITIALIZER(node) \
for ((node) = varpool_first_static_initializer (); (node); \
(node) = varpool_next_static_initializer (node))
+/* Walk all variables. */
+#define FOR_EACH_VARIABLE(node) \
+ for ((node) = varpool_nodes; (node); (node) = (node)->next)
+/* Walk all variables with definitions in current unit. */
+#define FOR_EACH_DEFINED_VARIABLE(node) \
+ for ((node) = varpool_nodes_queue; (node); (node) = (node)->next_needed)
/* Return first function with body defined. */
static inline struct cgraph_node *
@@ -803,7 +809,9 @@ cgraph_next_defined_function (struct cgraph_node *node)
#define FOR_EACH_DEFINED_FUNCTION(node) \
for ((node) = cgraph_first_defined_function (); (node); \
(node) = cgraph_next_defined_function (node))
-
+/* Walk all functions. */
+#define FOR_EACH_FUNCTION(node) \
+ for ((node) = cgraph_nodes; (node); (node) = (node)->next)
/* Return true when NODE is a function with Gimple body defined
in current unit. Functions can also be define externally or they