diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-02-28 23:53:37 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-02-28 22:53:37 +0000 |
commit | bbcdfb939d7ef82bd50afe51b1f332f7191e6d27 (patch) | |
tree | c32755a5a38bfe82f67db1abd992747ee4ea92fc | |
parent | 412049de810dde0c4d97742678e6a36ca477aeda (diff) | |
download | gcc-bbcdfb939d7ef82bd50afe51b1f332f7191e6d27.zip gcc-bbcdfb939d7ef82bd50afe51b1f332f7191e6d27.tar.gz gcc-bbcdfb939d7ef82bd50afe51b1f332f7191e6d27.tar.bz2 |
re PR ipa/65237 (r221040 caused many regressions)
PR ipa/65237
* ipa-icf.c (sem_function::merge): Do not attempt to produce alias
across COMDAT group boundary.
From-SVN: r221079
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-icf.c | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db44c28..4c45c2e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2015-02-28 Jan Hubicka <hubicka@ucw.cz> + PR ipa/65237 + * ipa-icf.c (sem_function::merge): Do not attempt to produce alias + across COMDAT group boundary. + +2015-02-28 Jan Hubicka <hubicka@ucw.cz> + PR ipa/65232 * ipa-icf.c (clear_decl_rtl): New function. (sem_function::merge): Clear RTL before forming alias. diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index ef7c855..d66d4c8 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -755,12 +755,17 @@ sem_function::merge (sem_item *alias_item) it is an external functions where we can not create an alias (ORIGINAL_DISCARDABLE) 3) if target do not support symbol aliases. + 4) original and alias lie in different comdat groups. If we can not produce alias, we will turn ALIAS into WRAPPER of ORIGINAL and/or redirect all callers from ALIAS to ORIGINAL. */ if ((original_address_matters && alias_address_matters) - || original_discardable - || !sem_item::target_supports_symbol_aliases_p ()) + || (original_discardable + && (!DECL_COMDAT_GROUP (alias->decl) + || (DECL_COMDAT_GROUP (alias->decl) + != DECL_COMDAT_GROUP (original->decl)))) + || !sem_item::target_supports_symbol_aliases_p () + || DECL_COMDAT_GROUP (alias->decl) != DECL_COMDAT_GROUP (original->decl)) { /* First see if we can produce wrapper. */ |