aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-03-04 21:28:08 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-03-04 20:28:08 +0000
commita6a543bfa860d89ca4fb5734233ede5796b10103 (patch)
tree2724c9b62285c2c1dc7ecae0dea0d9cc465c8847 /gcc/cgraph.h
parentd720e658eba57e78e8493d9126921bd4f07130b0 (diff)
downloadgcc-a6a543bfa860d89ca4fb5734233ede5796b10103.zip
gcc-a6a543bfa860d89ca4fb5734233ede5796b10103.tar.gz
gcc-a6a543bfa860d89ca4fb5734233ede5796b10103.tar.bz2
cgraph.c (cgraph_node::can_remove_if_no_direct_calls_p): Rewrite for correct comdat handling.
* cgraph.c (cgraph_node::can_remove_if_no_direct_calls_p): Rewrite for correct comdat handling. (cgraph_node::will_be_removed_from_program_if_no_direct_calls_p): Likewise. * cgraph.h (call_for_symbol_and_aliases): Fix formating. (used_from_object_file_p_worker): Remove. (cgraph_node::only_called_directly_or_alised): Add used_from_object_file_p. * ipa-inline-analysis.c (growth_likely_positive): Optimie. * ipa-inline-transform.c (can_remove_node_now_p_1): Use can_remove_if_no_direct_calls_and_refs_p. From-SVN: r221193
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 82519fa..c4f39ba 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -258,8 +258,8 @@ public:
When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are
skipped. */
bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *),
- void *data,
- bool include_overwrite);
+ void *data,
+ bool include_overwrite);
/* If node can not be interposable by static or dynamic linker to point to
different definition, return this symbol. Otherwise look for alias with
@@ -1187,12 +1187,6 @@ public:
returns cgraph_node::get (DECL). */
static cgraph_node * create_same_body_alias (tree alias, tree decl);
- /* Worker for cgraph_can_remove_if_no_direct_calls_p. */
- static bool used_from_object_file_p_worker (cgraph_node *node, void *)
- {
- return node->used_from_object_file_p ();
- }
-
/* Verify whole cgraph structure. */
static void DEBUG_FUNCTION verify_cgraph_nodes (void);
@@ -2736,6 +2730,7 @@ cgraph_node::only_called_directly_or_aliased_p (void)
&& !DECL_VIRTUAL_P (decl)
&& !DECL_STATIC_CONSTRUCTOR (decl)
&& !DECL_STATIC_DESTRUCTOR (decl)
+ && !used_from_object_file_p ()
&& !externally_visible);
}