* Prevent merging across COMDAT group boundary
@ 2015-02-28 22:42 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2015-02-28 22:42 UTC (permalink / raw)
To: gcc-patches, mliska
Hi,
tihs patch fixes one case I forgot in sem_function::merge: When target is not
in comdat group, we still can not make alias in the case source is.
Bootstrapped/regtested x86_64-linux, Martin, can you double check this fixes the xalancbmk?
Honza
PR ipa/65237
* ipa-icf.c (sem_function::merge): Do not attempt to produce alias
across COMDAT group boundary.
Index: ipa-icf.c
===================================================================
--- ipa-icf.c (revision 221076)
+++ ipa-icf.c (working copy)
@@ -745,12 +755,17 @@ sem_function::merge (sem_item *alias_ite
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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-28 22:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-28 22:42 Prevent merging across COMDAT group boundary Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).