From patchwork Thu Oct 25 02:34:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 194015 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 50F052C009B for ; Thu, 25 Oct 2012 13:34:32 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1351737273; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=e28JJUt CBPf2mu0sXf3dRNoF+xI=; b=dXDyEb//sZYZFZKmOC4K8Ak/6xqOp3aGWWnARyp mkOCk2Zakeca3qGntK9NsGPhQ8xTclnPW+UVbC932jkaSdKVQ7a5VfDYxto7VOZX bbvE1wrI9GtM30UmVr8xgMyEIup89p5A/wqUDp7XNYAn+wqPGwbMUKPn6yiQWjga htxg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=VZyAAqsfN2PJe87sp7AvFY2zWHH3UvlAT0jl/1w/SdBq8RmD3Wbk4EO00d1bPK Ry7+AWRU/DSKfbJW1abCrWiCD2Ecl6HHE+D7kVSL5pi80FJio3b+KY6DD310Y0Tt HQBn5Ay6rMH8qUj44U6EdvbnFH7xhfOmhQzs4gsuQzCmQ=; Received: (qmail 7804 invoked by alias); 25 Oct 2012 02:34:29 -0000 Received: (qmail 7728 invoked by uid 22791); 25 Oct 2012 02:34:28 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, 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; Thu, 25 Oct 2012 02:34:18 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9P2YH9c025935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Oct 2012 22:34:17 -0400 Received: from Mair.local (vpn-11-145.rdu.redhat.com [10.11.11.145]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q9P2YGnK026333 for ; Wed, 24 Oct 2012 22:34:17 -0400 Message-ID: <5088A528.2060406@redhat.com> Date: Wed, 24 Oct 2012 22:34:16 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: GCC Patches Subject: patch to fix PR55067 X-IsSubscribed: yes 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 The following patch is to fix http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55067 Committed as rev. 192794. 2012-10-24 Vladimir Makarov PR bootstrap/55067 * lra.c: Rename loc to sloc and loc_t to sloc_t. Index: lra.c =================================================================== --- lra.c (revision 192742) +++ lra.c (working copy) @@ -1859,19 +1859,19 @@ lra_process_new_insns (rtx insn, rtx bef scratches at the end of LRA. */ /* Description of location of a former scratch operand. */ -struct loc +struct sloc { rtx insn; /* Insn where the scratch was. */ int nop; /* Number of the operand which was a scratch. */ }; -typedef struct loc *loc_t; +typedef struct sloc *sloc_t; -DEF_VEC_P(loc_t); -DEF_VEC_ALLOC_P(loc_t, heap); +DEF_VEC_P(sloc_t); +DEF_VEC_ALLOC_P(sloc_t, heap); /* Locations of the former scratches. */ -static VEC (loc_t, heap) *scratches; +static VEC (sloc_t, heap) *scratches; /* Bitmap of scratch regnos. */ static bitmap_head scratch_bitmap; @@ -1902,11 +1902,11 @@ remove_scratches (void) bool insn_changed_p; basic_block bb; rtx insn, reg; - loc_t loc; + sloc_t loc; lra_insn_recog_data_t id; struct lra_static_insn_data *static_id; - scratches = VEC_alloc (loc_t, heap, get_max_uid ()); + scratches = VEC_alloc (sloc_t, heap, get_max_uid ()); bitmap_initialize (&scratch_bitmap, ®_obstack); bitmap_initialize (&scratch_operand_bitmap, ®_obstack); FOR_EACH_BB (bb) @@ -1926,10 +1926,10 @@ remove_scratches (void) *id->operand_loc[i], ALL_REGS, NULL); add_reg_note (insn, REG_UNUSED, reg); lra_update_dup (id, i); - loc = XNEW (struct loc); + loc = XNEW (struct sloc); loc->insn = insn; loc->nop = i; - VEC_safe_push (loc_t, heap, scratches, loc); + VEC_safe_push (sloc_t, heap, scratches, loc); bitmap_set_bit (&scratch_bitmap, REGNO (*id->operand_loc[i])); bitmap_set_bit (&scratch_operand_bitmap, INSN_UID (insn) * MAX_RECOG_OPERANDS + i); @@ -1950,11 +1950,11 @@ static void restore_scratches (void) { int i, regno; - loc_t loc; + sloc_t loc; rtx last = NULL_RTX; lra_insn_recog_data_t id = NULL; - for (i = 0; VEC_iterate (loc_t, scratches, i, loc); i++) + for (i = 0; VEC_iterate (sloc_t, scratches, i, loc); i++) { if (last != loc->insn) { @@ -1977,9 +1977,9 @@ restore_scratches (void) INSN_UID (loc->insn), loc->nop); } } - for (i = 0; VEC_iterate (loc_t, scratches, i, loc); i++) + for (i = 0; VEC_iterate (sloc_t, scratches, i, loc); i++) free (loc); - VEC_free (loc_t, heap, scratches); + VEC_free (sloc_t, heap, scratches); bitmap_clear (&scratch_bitmap); bitmap_clear (&scratch_operand_bitmap); }