diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-07 02:27:05 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-07 02:27:05 +0000 |
commit | 9410750769f24b2ffe41b230ca61214a73d4d2a0 (patch) | |
tree | 63a0d48e093baf01eaef591a754404df1020cbe3 /gcc/lto-cgraph.c | |
parent | ea7d8c7a9c53e45fa4482196a935142467a82403 (diff) | |
download | gcc-9410750769f24b2ffe41b230ca61214a73d4d2a0.tar.gz |
PR ipa/59469
* lto-cgraph.c (lto_output_node): Use
symtab_get_symbol_partitioning_class.
(lto_output_varpool_node): likewise.
(symtab_get_symbol_partitioning_class): Move here from
lto/lto-partition.c
* cgraph.h (symbol_partitioning_class): Likewise.
(symtab_get_symbol_partitioning_class): Declare.
* lto-partition.c (symbol_class): Move to cgraph.h
(get_symbol_class): Move to symtab.c
(add_references_to_partition, add_symbol_to_partition_1,
lto_max_map, lto_1_to_1_map, lto_balanced_map,
lto_promote_cross_file_statics): Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207589 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index e772072864a..ef3890db981 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -417,7 +417,8 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, Cherry-picked nodes: These are nodes we pulled from other translation units into SET during IPA-inlining. We make them as local static nodes to prevent clashes with other local statics. */ - if (boundary_p && node->analyzed && !DECL_EXTERNAL (node->decl)) + if (boundary_p && node->analyzed + && symtab_get_symbol_partitioning_class (node) == SYMBOL_PARTITION) { /* Inline clones can not be part of boundary. gcc_assert (!node->global.inlined_to); @@ -501,8 +502,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, bp_pack_value (&bp, node->unique_name, 1); bp_pack_value (&bp, node->address_taken, 1); bp_pack_value (&bp, tag == LTO_symtab_analyzed_node - && !DECL_EXTERNAL (node->decl) - && !DECL_COMDAT (node->decl) + && symtab_get_symbol_partitioning_class (node) == SYMBOL_PARTITION && (reachable_from_other_partition_p (node, encoder) || referenced_from_other_partition_p (&node->ref_list, encoder)), 1); @@ -569,9 +569,7 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, varpool_node *node, /* Constant pool initializers can be de-unified into individual ltrans units. FIXME: Alternatively at -Os we may want to avoid generating for them the local labels and share them across LTRANS partitions. */ - if (DECL_IN_CONSTANT_POOL (node->decl) - && !DECL_EXTERNAL (node->decl) - && !DECL_COMDAT (node->decl)) + if (symtab_get_symbol_partitioning_class (node) != SYMBOL_PARTITION) { bp_pack_value (&bp, 0, 1); /* used_from_other_parition. */ bp_pack_value (&bp, 0, 1); /* in_other_partition. */ |