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.
>         (ipa_tm_create_version): Same.
> 
 > --- trans-mem.c (revision 181793)
> +++ trans-mem.c (working copy)
> @@ -4213,7 +4213,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 (DECL_ONE_ONLY (new_decl))
>      DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
> 
>    new_node = cgraph_same_body_alias (NULL, new_decl, info->new_decl);
> @@ -4248,7 +4248,7 @@ ipa_tm_create_version (struct cgraph_nod
>    TREE_SYMBOL_REFERENCED (tm_name) = 1;
> 
>    /* Perform the same remapping to the comdat group.  */
> -  if (DECL_COMDAT (new_decl))
> +  if (DECL_ONE_ONLY (new_decl))
>      DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
> 
>    new_node = cgraph_copy_node_for_versioning (old_node, new_decl, NULL, 
> NULL);

        Jakub

Reply via email to