diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-25 16:31:42 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-25 16:31:42 +0000 |
commit | da5e1e7ce7a1323e3eeeeacd3687823d83cd1025 (patch) | |
tree | 59428eb8af21f903b36ff6bf0614f87d9cb27f0d /gcc/cgraph.h | |
parent | 2e4c90f020156f2a6054853e25bd6e1a2b0d98e6 (diff) | |
download | gcc-da5e1e7ce7a1323e3eeeeacd3687823d83cd1025.tar.gz |
* cgraphunit.c: Update toplevel comment.
(tree_rest_of_compilation): Merge into cgraph_expand_function.
(cgraph_analyze_function): Make static.
(cgraph_decide_is_function_needed): Make static.
(cgraph_add_new_function): Use expand_function instead of
rest_of_compilation.
(clone_of_p, verify_edge_count_and_frequency, cgraph_debug_gimple_stmt,
verify_edge_corresponds_to_fndecl, verify_cgraph_node, verify_cgraph):
Move to cgraph.c
(cgraph_inline_p): Remove.
(cgraph_preserve_function_body_p): Move to ipa-inline-transform.
(init_cgraph): Add comment.
* cgraphbuild.c (record_reference, mark_address, mark_load,
mark_store): Do not call analyze_expr hook.
* cgraph.c: Update toplevel comment.
(clone_of_p, verify_edge_count_and_frequency, cgraph_debug_gimple_stmt,
verify_edge_corresponds_to_fndecl, verify_cgraph_node, verify_cgraph):
Move fere from cgraphunit.c
(cgraph_mark_force_output_node): Move to cgraph.h
* cgraph.h: Reorder so the comments match the function placement.
(cgraph_analyze_function, cgraph_decide_is_function_needed): Remove.
(cgraph_mark_force_output_node): Move here from cgraph.c
* tree.c (free_lang_data): Do not clear analyze_expr hook.
* ipa-inline-transform.c (preserve_function_body_p): New function.
(inline_transform): Update.
* langhooks.c (lhd_callgraph_analyze_expr): Remove.
* langhooks.h (lang_hooks_for_callgraph): Remove.
(lang_hooks): Remove callgraph.
* tree-inline.c (expand_call_inline): Do not use cgraph_inline_p.
* varpool.c: Remove out of date comment.
* langhooks-def.h (lhd_callgraph_analyze_expr): Remove.
(LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186832 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index df74d51af8f..652556f9df1 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -574,37 +574,9 @@ bool cgraph_for_node_and_aliases (struct cgraph_node *, bool (*) (struct cgraph_node *, void *), void *, bool); VEC (cgraph_edge_p, heap) * collect_callers_of_node (struct cgraph_node *node); - - -/* In cgraphunit.c */ -extern FILE *cgraph_dump_file; -void cgraph_finalize_function (tree, bool); -void cgraph_analyze_function (struct cgraph_node *); -void cgraph_finalize_compilation_unit (void); -void cgraph_optimize (void); -void cgraph_mark_force_output_node (struct cgraph_node *); -void cgraph_mark_address_taken_node (struct cgraph_node *); -bool cgraph_inline_p (struct cgraph_edge *, cgraph_inline_failed_t *reason); -bool cgraph_preserve_function_body_p (struct cgraph_node *); void verify_cgraph (void); void verify_cgraph_node (struct cgraph_node *); -void cgraph_build_static_cdtor (char which, tree body, int priority); -void cgraph_reset_static_var_maps (void); -void init_cgraph (void); -struct cgraph_node * cgraph_copy_node_for_versioning (struct cgraph_node *, - tree, VEC(cgraph_edge_p,heap)*, bitmap); -struct cgraph_node *cgraph_function_versioning (struct cgraph_node *, - VEC(cgraph_edge_p,heap)*, - VEC(ipa_replace_map_p,gc)*, - bitmap, bool, bitmap, - basic_block, const char *); -void tree_function_versioning (tree, tree, VEC (ipa_replace_map_p,gc)*, - bool, bitmap, bool, bitmap, basic_block); -void record_references_in_initializer (tree, bool); -bool cgraph_process_new_functions (void); -void cgraph_process_same_body_aliases (void); - -bool cgraph_decide_is_function_needed (struct cgraph_node *, tree); +void cgraph_mark_address_taken_node (struct cgraph_node *); typedef void (*cgraph_edge_hook)(struct cgraph_edge *, void *); typedef void (*cgraph_node_hook)(struct cgraph_node *, void *); @@ -631,10 +603,31 @@ struct cgraph_2node_hook_list *cgraph_add_node_duplication_hook (cgraph_2node_ho void cgraph_remove_node_duplication_hook (struct cgraph_2node_hook_list *); gimple cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *); bool cgraph_propagate_frequency (struct cgraph_node *node); + +/* In cgraphunit.c */ +extern FILE *cgraph_dump_file; +void cgraph_finalize_function (tree, bool); +void cgraph_finalize_compilation_unit (void); +void cgraph_optimize (void); +void init_cgraph (void); +struct cgraph_node * cgraph_copy_node_for_versioning (struct cgraph_node *, + tree, VEC(cgraph_edge_p,heap)*, bitmap); +struct cgraph_node *cgraph_function_versioning (struct cgraph_node *, + VEC(cgraph_edge_p,heap)*, + VEC(ipa_replace_map_p,gc)*, + bitmap, bool, bitmap, + basic_block, const char *); +void tree_function_versioning (tree, tree, VEC (ipa_replace_map_p,gc)*, + bool, bitmap, bool, bitmap, basic_block); +bool cgraph_process_new_functions (void); +void cgraph_process_same_body_aliases (void); + + /* In cgraphbuild.c */ unsigned int rebuild_cgraph_edges (void); void cgraph_rebuild_references (void); int compute_call_stmt_bb_frequency (tree, basic_block bb); +void record_references_in_initializer (tree, bool); /* In ipa.c */ bool cgraph_remove_unreachable_nodes (bool, FILE *); @@ -646,6 +639,7 @@ void cgraph_node_set_remove (cgraph_node_set, struct cgraph_node *); void dump_cgraph_node_set (FILE *, cgraph_node_set); void debug_cgraph_node_set (cgraph_node_set); void free_cgraph_node_set (cgraph_node_set); +void cgraph_build_static_cdtor (char which, tree body, int priority); varpool_node_set varpool_node_set_new (void); varpool_node_set_iterator varpool_node_set_find (varpool_node_set, @@ -1284,4 +1278,14 @@ decl_is_tm_clone (const_tree fndecl) return n->tm_clone; return false; } + +/* Likewise indicate that a node is needed, i.e. reachable via some + external means. */ + +static inline void +cgraph_mark_force_output_node (struct cgraph_node *node) +{ + node->symbol.force_output = 1; + gcc_checking_assert (!node->global.inlined_to); +} #endif /* GCC_CGRAPH_H */ |