summaryrefslogtreecommitdiffstats
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-20 14:49:18 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-20 14:49:18 +0000
commit08843223915f937a606645b334d9743aee7d91d0 (patch)
tree177a4ee0cf4fce5cf2f9b7eda71d28eb9db862e4 /gcc/cgraph.h
parent8a21e4b4594224c34d8cd869f98ce2397aedf0a8 (diff)
downloadppe42-gcc-08843223915f937a606645b334d9743aee7d91d0.tar.gz
ppe42-gcc-08843223915f937a606645b334d9743aee7d91d0.zip
* 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/cgraph.h')
-rw-r--r--gcc/cgraph.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index dc6168a83ac..6bc565a2d17 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -249,11 +249,15 @@ struct GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) cgraph_node {
cgraph_remove_unreachable_nodes cgraph still can contain unreachable
nodes when they are needed for virtual clone instantiation. */
unsigned reachable : 1;
+ /* Set when function is reachable by call from other LTRANS partition. */
+ unsigned reachable_from_other_partition : 1;
/* Set once the function is lowered (i.e. its CFG is built). */
unsigned lowered : 1;
/* Set once the function has been instantiated and its callee
lists created. */
unsigned analyzed : 1;
+ /* Set when function is available in the other LTO partition. */
+ unsigned in_other_partition : 1;
/* Set when function is scheduled to be processed by local passes. */
unsigned process : 1;
/* Set for aliases once they got through assemble_alias. */
@@ -723,7 +727,7 @@ cgraph_only_called_directly_p (struct cgraph_node *node)
static inline bool
cgraph_can_remove_if_no_direct_calls_p (struct cgraph_node *node)
{
- return (!node->needed
+ return (!node->needed && !node->reachable_from_other_partition
&& (DECL_COMDAT (node->decl) || !node->local.externally_visible));
}
OpenPOWER on IntegriCloud