diff options
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 67a9024..e1c2595 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -485,11 +485,12 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, if (group) { - if (node->same_comdat_group && !boundary_p) + if (node->same_comdat_group) { - ref = lto_symtab_encoder_lookup (encoder, - node->same_comdat_group); - gcc_assert (ref != LCC_NOT_FOUND); + ref = LCC_NOT_FOUND; + for (struct symtab_node *n = node->same_comdat_group; + ref == LCC_NOT_FOUND && n != node; n = n->same_comdat_group) + ref = lto_symtab_encoder_lookup (encoder, n); } else ref = LCC_NOT_FOUND; @@ -523,6 +524,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, bp_pack_value (&bp, node->lowered, 1); bp_pack_value (&bp, in_other_partition, 1); bp_pack_value (&bp, node->alias, 1); + bp_pack_value (&bp, node->transparent_alias, 1); bp_pack_value (&bp, node->weakref, 1); bp_pack_value (&bp, node->frequency, 2); bp_pack_value (&bp, node->only_called_at_startup, 1); @@ -599,8 +601,9 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, varpool_node *node, bp_pack_value (&bp, node->definition && (encode_initializer_p || node->alias), 1); bp_pack_value (&bp, node->alias, 1); + bp_pack_value (&bp, node->transparent_alias, 1); bp_pack_value (&bp, node->weakref, 1); - bp_pack_value (&bp, node->analyzed && !boundary_p, 1); + bp_pack_value (&bp, node->analyzed && (!boundary_p || node->alias), 1); gcc_assert (node->definition || !node->analyzed); /* 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 @@ -632,11 +635,12 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, varpool_node *node, if (group) { - if (node->same_comdat_group && !boundary_p) + if (node->same_comdat_group) { - ref = lto_symtab_encoder_lookup (encoder, - node->same_comdat_group); - gcc_assert (ref != LCC_NOT_FOUND); + ref = LCC_NOT_FOUND; + for (struct symtab_node *n = node->same_comdat_group; + ref == LCC_NOT_FOUND && n != node; n = n->same_comdat_group) + ref = lto_symtab_encoder_lookup (encoder, n); } else ref = LCC_NOT_FOUND; @@ -1170,6 +1174,7 @@ input_overwrite_node (struct lto_file_decl_data *file_data, TREE_STATIC (node->decl) = 0; } node->alias = bp_unpack_value (bp, 1); + node->transparent_alias = bp_unpack_value (bp, 1); node->weakref = bp_unpack_value (bp, 1); node->frequency = (enum node_frequency)bp_unpack_value (bp, 2); node->only_called_at_startup = bp_unpack_value (bp, 1); @@ -1369,6 +1374,7 @@ input_varpool_node (struct lto_file_decl_data *file_data, node->writeonly = bp_unpack_value (&bp, 1); node->definition = bp_unpack_value (&bp, 1); node->alias = bp_unpack_value (&bp, 1); + node->transparent_alias = bp_unpack_value (&bp, 1); node->weakref = bp_unpack_value (&bp, 1); node->analyzed = bp_unpack_value (&bp, 1); node->used_from_other_partition = bp_unpack_value (&bp, 1); |