diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-20 14:49:18 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-20 14:49:18 +0000 |
commit | 08843223915f937a606645b334d9743aee7d91d0 (patch) | |
tree | 177a4ee0cf4fce5cf2f9b7eda71d28eb9db862e4 /gcc/cgraphunit.c | |
parent | 8a21e4b4594224c34d8cd869f98ce2397aedf0a8 (diff) | |
download | gcc-08843223915f937a606645b334d9743aee7d91d0.tar.gz |
* cgraph.c (cgraph_remove_node): Kill bodies in other partitoin.
(dump_cgraph_node): Dump new flags.
* cgraph.h (struct cgraph_node): Add flags reachable_from_other_partition
and in_other_partition.
(cgraph_can_remove_if_no_direct_calls_p): Functions used by other partition
can not be removed.
* cgraphunit.c (cgraph_mark_functions_to_output): Functions used by the other
partition must be output; silence sanity checking on leaking functions
bodies from other paritition.
* lto-cgraph.c (reachable_from_other_partition_p): New function.
(lto_output_node): Output new flags; do not sanity check that inline
clones are output; drop lto_forced_extern_inline_p code; do not mock
visibility flags at partition boundaries.
(add_node_to): New function.
(output_cgraph): Use it to sort functions so masters appear before
clones.
(input_overwrite_node): Input new flags.
* passes.c (ipa_write_summaries): Do not call
lto_new_extern_inline_states.
* lto-section-out.c (forced_extern_inline, lto_new_extern_inline_states,
lto_delete_extern_inline_states, lto_force_functions_extern_inline,
lto_forced_extern_inline_p): Kill.
* lto-streamer.h (lto_new_extern_inline_states,
* lto_delete_extern_inline_states, lto_force_functions_extern_inline,
lto_forced_extern_inline_p): Kill.
* lto.c (lto_add_inline_clones): Do not track inlined_decls.
(lto_add_all_inlinees): Likewise.
(lto_wpa_write_files): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158563 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index afcd660ee40..7d65b0476ef 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1130,7 +1130,7 @@ cgraph_mark_functions_to_output (void) outside the current compilation unit. */ if (node->analyzed && !node->global.inlined_to - && (node->needed + && (node->needed || node->reachable_from_other_partition || (e && node->reachable)) && !TREE_ASM_WRITTEN (decl) && !DECL_EXTERNAL (decl)) @@ -1157,6 +1157,10 @@ cgraph_mark_functions_to_output (void) #ifdef ENABLE_CHECKING if (!node->global.inlined_to && gimple_has_body_p (decl) + /* FIXME: in ltrans unit when offline copy is outside partition but inline copies + are inside partition, we can end up not removing the body since we no longer + have analyzed node pointing to it. */ + && !node->in_other_partition && !DECL_EXTERNAL (decl)) { dump_cgraph_node (stderr, node); @@ -1165,6 +1169,7 @@ cgraph_mark_functions_to_output (void) #endif gcc_assert (node->global.inlined_to || !gimple_has_body_p (decl) + || node->in_other_partition || DECL_EXTERNAL (decl)); } @@ -1178,6 +1183,10 @@ cgraph_mark_functions_to_output (void) tree decl = node->decl; if (!node->global.inlined_to && gimple_has_body_p (decl) + /* FIXME: in ltrans unit when offline copy is outside partition but inline copies + are inside partition, we can end up not removing the body since we no longer + have analyzed node pointing to it. */ + && !node->in_other_partition && !DECL_EXTERNAL (decl)) { dump_cgraph_node (stderr, node); |