diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-04 20:28:08 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-04 20:28:08 +0000 |
commit | e88fecaff3e1d3062b9ed1b41015f5df7c926c2b (patch) | |
tree | 2724c9b62285c2c1dc7ecae0dea0d9cc465c8847 /gcc/ipa-inline-transform.c | |
parent | e010dafc700854f229a7180019391deacf4d8ed9 (diff) | |
download | gcc-e88fecaff3e1d3062b9ed1b41015f5df7c926c2b.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221193 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r-- | gcc/ipa-inline-transform.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index 38a98dbe43c..43bb41fa8fa 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -112,9 +112,12 @@ can_remove_node_now_p_1 (struct cgraph_node *node, struct cgraph_edge *e) } /* FIXME: When address is taken of DECL_EXTERNAL function we still can remove its offline copy, but we would need to keep unanalyzed node in - the callgraph so references can point to it. */ + the callgraph so references can point to it. + + Also for comdat group we can ignore references inside a group as we + want to prove the group as a whole to be dead. */ return (!node->address_taken - && node->can_remove_if_no_direct_calls_p () + && node->can_remove_if_no_direct_calls_and_refs_p () /* Inlining might enable more devirtualizing, so we want to remove those only after all devirtualizable virtual calls are processed. Lacking may edges in callgraph we just preserve them post |