From patchwork Tue Nov 22 13:06:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 127075 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 18FD5B70DC for ; Wed, 23 Nov 2011 00:07:10 +1100 (EST) Received: (qmail 11986 invoked by alias); 22 Nov 2011 13:07:04 -0000 Received: (qmail 11974 invoked by uid 22791); 22 Nov 2011 13:07:02 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Nov 2011 13:06:43 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAMD6hRA007382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Nov 2011 08:06:43 -0500 Received: from houston.quesejoda.com (vpn-8-164.rdu.redhat.com [10.11.8.164]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pAMD6gYT004049; Tue, 22 Nov 2011 08:06:42 -0500 Message-ID: <4ECB9E61.5020202@redhat.com> Date: Tue, 22 Nov 2011 07:06:41 -0600 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Richard Henderson CC: David Edelsohn , gcc-patches Subject: Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP References: <4EC6CCF4.9050405@redhat.com> <4ECAF310.80705@redhat.com> In-Reply-To: <4ECAF310.80705@redhat.com> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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) = DECL_COMDAT_GROUP (old_decl); > > 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. > > > r~ David, can you try the following and see if it fixes the problem on your end? new_node = cgraph_same_body_alias (NULL, new_decl, info->new_decl); @@ -4233,7 +4233,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 (HAVE_COMDAT_GROUP && DECL_COMDAT (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); Index: trans-mem.c =================================================================== --- trans-mem.c (revision 181588) +++ trans-mem.c (working copy) @@ -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 && DECL_COMDAT (new_decl)) DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));