Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-29 Thread David Edelsohn
On Mon, Nov 28, 2011 at 7:02 PM, Richard Henderson r...@redhat.com wrote: On 11/28/2011 03:54 PM, David Edelsohn wrote: On Wed, Nov 23, 2011 at 8:57 AM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Nov 23, 2011 at 07:47:46AM -0600, Aldy Hernandez wrote: @@ -4198,7 +4198,7 @@

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-29 Thread Jakub Jelinek
On Tue, Nov 29, 2011 at 11:22:15AM -0500, David Edelsohn wrote: A patch using DECL_ONE_ONLY works for me as well. Can someone approve that version of the patch? This is ok for the trunk, thanks. * trans-mem.c (ipa_tm_create_version_alias): Mangle new_decl if DECL_ONE_ONLY.

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-28 Thread David Edelsohn
On Wed, Nov 23, 2011 at 8:57 AM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Nov 23, 2011 at 07:47:46AM -0600, Aldy Hernandez wrote: @@ -4198,7 +4198,7 @@ ipa_tm_create_version_alias (struct cgra   TREE_SYMBOL_REFERENCED (tm_name) = 1;   /* Perform the same remapping to the comdat group.

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-28 Thread Richard Henderson
On 11/28/2011 03:54 PM, David Edelsohn wrote: On Wed, Nov 23, 2011 at 8:57 AM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Nov 23, 2011 at 07:47:46AM -0600, Aldy Hernandez wrote: @@ -4198,7 +4198,7 @@ ipa_tm_create_version_alias (struct cgra TREE_SYMBOL_REFERENCED (tm_name) = 1; /*

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-23 Thread David Edelsohn
On Tue, Nov 22, 2011 at 8:06 AM, Aldy Hernandez al...@redhat.com wrote: David, can you try the following and see if it fixes the problem on your end? Index: trans-mem.c === --- trans-mem.c (revision 181588) +++ trans-mem.c

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-23 Thread Aldy Hernandez
Richard, do you have an opinion on either one of these approaches? Both bootstrap and regtest on x86-64 Linux and David AIX :-). OK? Which one? On 11/22/11 07:58, David Edelsohn wrote: On Tue, Nov 22, 2011 at 8:06 AM, Aldy Hernandezal...@redhat.com wrote: This looks weird -- you're

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-23 Thread Jakub Jelinek
On Wed, Nov 23, 2011 at 07:47:46AM -0600, Aldy Hernandez wrote: @@ -4198,7 +4198,7 @@ ipa_tm_create_version_alias (struct cgra TREE_SYMBOL_REFERENCED (tm_name) = 1; /* Perform the same remapping to the comdat group. */ - if (DECL_COMDAT (new_decl)) + if (HAVE_COMDAT_GROUP

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-22 Thread Aldy Hernandez
On 11/21/11 18:55, Richard Henderson wrote: On 11/18/2011 01:24 PM, Aldy Hernandez wrote: - if (DECL_COMDAT (new_decl)) + if (DECL_COMDAT (new_decl) HAVE_COMDAT_GROUP) DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl)); + else +DECL_COMDAT_GROUP (new_decl) =

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-22 Thread David Edelsohn
On Tue, Nov 22, 2011 at 8:06 AM, Aldy Hernandez al...@redhat.com wrote: This looks weird -- you're seting D_C_G after H_C_G is false? We've already done copy_decl anyway -- you should be able to drop the else. David, can you try the following and see if it fixes the problem on your end?

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP

2011-11-21 Thread Richard Henderson
On 11/18/2011 01:24 PM, Aldy Hernandez wrote: - if (DECL_COMDAT (new_decl)) + if (DECL_COMDAT (new_decl) HAVE_COMDAT_GROUP) DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl)); + else +DECL_COMDAT_GROUP (new_decl) = DECL_COMDAT_GROUP (old_decl); This looks