From patchwork Mon Nov 7 05:55: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: 124005 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 60E57B6F6B for ; Mon, 7 Nov 2011 16:56:04 +1100 (EST) Received: (qmail 12154 invoked by alias); 7 Nov 2011 05:56:01 -0000 Received: (qmail 12139 invoked by uid 22791); 7 Nov 2011 05:56:00 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL, BAYES_00, 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; Mon, 07 Nov 2011 05:55:43 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA75thYj029032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Nov 2011 00:55:43 -0500 Received: from austin.quesejoda.com (vpn-8-29.rdu.redhat.com [10.11.8.29]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pA75tfNE016944; Mon, 7 Nov 2011 00:55:42 -0500 Message-ID: <4EB772DD.7020904@redhat.com> Date: Sun, 06 Nov 2011 21:55:41 -0800 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: Richard Henderson CC: Richard Guenther , gcc-patches Subject: Re: [patch] 19/n: trans-mem: middle end/misc patches (LAST PATCH) References: <4EB2EC3F.6000908@redhat.com> <4EB6D797.4070309@redhat.com> <4EB6EC02.8010907@redhat.com> In-Reply-To: <4EB6EC02.8010907@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 > False. You get the equivalent of bootstrap comparison mismatches. > If we actually used tm during the bootstrap. > > The simplest thing to do is to change the hash this table uses. > E.g. use the DECL_UID right from the start, rather than the pointer. Woah! Can it be that easy? That's as easy as changing the hash, no conversion necessary. OK for branch? * varasm.c (record_tm_clone_pair): Use DECL_UID as hash. (get_tm_clone_pair): Same. Index: varasm.c =================================================================== --- varasm.c (revision 181067) +++ varasm.c (working copy) @@ -5875,7 +5875,7 @@ record_tm_clone_pair (tree o, tree n) tm_clone_pairs = htab_create_ggc (32, tree_map_hash, tree_map_eq, 0); h = ggc_alloc_tree_map (); - h->hash = htab_hash_pointer (o); + h->hash = DECL_UID (o); h->base.from = o; h->to = n; @@ -5892,7 +5892,7 @@ get_tm_clone_pair (tree o) struct tree_map *h, in; in.base.from = o; - in.hash = htab_hash_pointer (o); + in.hash = DECL_UID (o); h = (struct tree_map *) htab_find_with_hash (tm_clone_pairs, &in, in.hash); if (h)