diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-02-05 00:26:36 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-02-04 23:26:36 +0000 |
commit | d665f8dde6f4d6c68635cbef972ef7ce085a359b (patch) | |
tree | bbf5ad857d73a9614797d6f9dbe1e05f2d043715 /gcc/lto | |
parent | 6a071860bfd406eaad6b5c8ad68b1632ed1c9de6 (diff) | |
download | gcc-d665f8dde6f4d6c68635cbef972ef7ce085a359b.zip gcc-d665f8dde6f4d6c68635cbef972ef7ce085a359b.tar.gz gcc-d665f8dde6f4d6c68635cbef972ef7ce085a359b.tar.bz2 |
ipa.c (function_and_variable_visibility): Decompose DECL_ONE_ONLY groups when we know they are controlled by LTO.
* ipa.c (function_and_variable_visibility): Decompose DECL_ONE_ONLY
groups when we know they are controlled by LTO.
* varasm.c (default_binds_local_p_1): If object is in other partition,
it will be resolved locally.
* lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
needs duplicating, not generic COMDAT.
From-SVN: r207489
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto-partition.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 437e97e..0f9e688 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2014-02-04 Jan Hubicka <hubicka@ucw.cz> + + * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY + needs duplicating, not generic COMDAT. + 2014-02-04 Richard Biener <rguenther@suse.de> PR lto/59723 diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c index 6b2d488..da76b10 100644 --- a/gcc/lto/lto-partition.c +++ b/gcc/lto/lto-partition.c @@ -94,10 +94,12 @@ get_symbol_class (symtab_node *node) else if (!cgraph (node)->definition) return SYMBOL_EXTERNAL; - /* Comdats are duplicated to every use unless they are keyed. - Those do not need duplication. */ - if (DECL_COMDAT (node->decl) + /* Linker discardable symbols are duplicated to every use unless they are + keyed. + Keyed symbols or those. */ + if (DECL_ONE_ONLY (node->decl) && !node->force_output + && !node->forced_by_abi && !symtab_used_from_object_file_p (node)) return SYMBOL_DUPLICATE; |