diff options
author | Jan Hubicka <jh@suse.cz> | 2012-05-17 18:37:33 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2012-05-17 16:37:33 +0000 |
commit | 6649df51ec79ed1ffe81dc8b93b7fc8cce85040f (patch) | |
tree | c091b61bf18ed877244605adef29bd8f35c140b1 /gcc/lto-cgraph.c | |
parent | f9eead1f8953869fcfd8be7b0e58aff50fbe1fd5 (diff) | |
download | gcc-6649df51ec79ed1ffe81dc8b93b7fc8cce85040f.zip gcc-6649df51ec79ed1ffe81dc8b93b7fc8cce85040f.tar.gz gcc-6649df51ec79ed1ffe81dc8b93b7fc8cce85040f.tar.bz2 |
lto-symtab.c (lto_symtab_resolve_symbols): Preffer decl with constructor over decl without.
* lto-symtab.c (lto_symtab_resolve_symbols): Preffer decl with constructor
over decl without.
* cgraph.c (cgraph_remove_node): Clear also body of unanalyzed nodes.
* cgraph.h (varpool_can_remove_if_no_refs): Handle external correctly.
* cgraphunit.c (process_function_and_variable_attributes): Finalize
extrnal decls.
(mark_functions_to_output): Also accept bodies for functions with clones.
(output_in_order): Skip external vars.
* lto-cgraph.c (lto_output_node): External functions are never in other
partition.
(lto_output_varpool_node): Likewise.
* lto-streamer-out.c (lto_write_tree): Always use error_mark_nodes for
forgotten initializers.
* ipa.c (process_references): Handle external vars.
(symtab_remove_unreachable_nodes): Update to handle external vars.
(varpool_externally_visible_p): External vars are externally visible.
* gimple-fold.c (can_refer_decl_in_current_unit_p): Update.
* varpool.c (varpool_remove_node): Remove constructor.
(decide_is_variable_needed): Handle externals.
(varpool_remove_unreferenced_decls): Likewise.
* lto-partition.c (add_references_to_partition): Handle external vars.
(partition_varpool_node_p): Likewise.
(lto_promote_cross_file_statics): Do not promote externals.
From-SVN: r187631
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 2563489..447948f 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -440,7 +440,7 @@ 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) + if (boundary_p && node->analyzed && !DECL_EXTERNAL (node->symbol.decl)) { /* Inline clones can not be part of boundary. gcc_assert (!node->global.inlined_to); @@ -575,6 +575,7 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, struct varpool_node 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->symbol.decl) + && !DECL_EXTERNAL (node->symbol.decl) && !DECL_COMDAT (node->symbol.decl)) { bp_pack_value (&bp, 0, 1); /* used_from_other_parition. */ @@ -585,7 +586,8 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, struct varpool_node bp_pack_value (&bp, node->analyzed && referenced_from_other_partition_p (&node->symbol.ref_list, set, vset), 1); - bp_pack_value (&bp, boundary_p, 1); /* in_other_partition. */ + bp_pack_value (&bp, boundary_p && !DECL_EXTERNAL (node->symbol.decl), 1); + /* in_other_partition. */ } streamer_write_bitpack (&bp); if (node->alias_of) |