aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-06-13 09:19:09 +0000
committerJan Hubicka <jh@suse.cz>2011-06-13 09:19:09 +0000
commit65125cb5ff3dd3deb787d25b5c5bc305a328aabc (patch)
tree7e356df77924fcdd550af73036e37d71e9ab5ddb /gcc/cgraph.h
parentcd24087824383815b1183a0d3c9b5fb18f05b3f5 (diff)
* cgraph.c (cgraph_for_node_thunks_and_aliases,
cgraph_for_node_and_aliases): Fix thinko in recursive walking. (nonremovable_p): New function. (cgraph_can_remove_if_no_direct_calls_p): New function. (used_from_object_file_p): New functoin. (cgraph_will_be_removed_from_program_if_no_direct_calls): Look for references from aliases. * cgraph.h (cgraph_can_remove_if_no_direct_calls_p): Bring offline. * ipa-inline.c (check_caller_edge): New function. (want_inline_function_called_once_p): Use it; accept aliases called once, too. * ipa-inline-analysis.c (do_estimate_growth): Remove FIXME. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174985 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 09d99b1c1f7..feb742d387e 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -535,6 +535,7 @@ bool cgraph_will_be_removed_from_program_if_no_direct_calls
(struct cgraph_node *node);
bool cgraph_can_remove_if_no_direct_calls_and_refs_p
(struct cgraph_node *node);
+bool cgraph_can_remove_if_no_direct_calls_p (struct cgraph_node *node);
bool resolution_used_from_other_file_p (enum ld_plugin_symbol_resolution);
bool cgraph_used_from_object_file_p (struct cgraph_node *);
bool varpool_used_from_object_file_p (struct varpool_node *);
@@ -926,20 +927,6 @@ cgraph_only_called_directly_or_aliased_p (struct cgraph_node *node)
if all direct calls are eliminated. */
static inline bool
-cgraph_can_remove_if_no_direct_calls_p (struct cgraph_node *node)
-{
- /* Extern inlines can always go, we will use the external definition. */
- if (DECL_EXTERNAL (node->decl))
- return true;
- return (!node->address_taken
- && cgraph_can_remove_if_no_direct_calls_and_refs_p (node)
- && !ipa_ref_has_aliases_p (&node->ref_list));
-}
-
-/* Return true when function NODE can be removed from callgraph
- if all direct calls are eliminated. */
-
-static inline bool
varpool_can_remove_if_no_refs (struct varpool_node *node)
{
return (!node->force_output && !node->used_from_other_partition