From patchwork Thu Aug 23 19:58:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 179714 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 94D192C009D for ; Fri, 24 Aug 2012 05:59:13 +1000 (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=1346356754; 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=XI5aJjO 8dMbJPGTj1s0YkGlLHSs=; b=Ampk87qWGCuFMlfVR1rf3SDbazXQ5CU5xlbTjW0 zWtgZ4bIsvGKAAV7zLktiqoXByoT+X0VV5Yikwd5r+7D/cCAAuufbKS0IS3iTC44 qYaEcfcyiTrOcrfTvE3Rk2GgQTOt1EZA8WU/ppc0i7H7iurLrFZ4WVIz9Tl65Vkm dJdI= 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=HJNSYGFQ2ThoscKH0f5mvnuy2QziVCBCZAd/QIH/BbpQhrp3BWoNsE6piCHFJx hvEti5vvz+FaPW7HkTlat5ymPFOOycW0ASWq+NovxYNowNY3wsuvMRuNuZzSUYvd ywk0YgyASCcXunmgXrrb3dw/IRjXQTosMt5s8LWTFAjPQ=; Received: (qmail 8521 invoked by alias); 23 Aug 2012 19:59:10 -0000 Received: (qmail 8513 invoked by uid 22791); 23 Aug 2012 19:59:09 -0000 X-SWARE-Spam-Status: No, hits=-6.3 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, 23 Aug 2012 19:58:53 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7NJwq4i020958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 Aug 2012 15:58:52 -0400 Received: from ivy.local (ovpn-113-31.phx2.redhat.com [10.3.113.31]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7NJwqOL030488 for ; Thu, 23 Aug 2012 15:58:52 -0400 Message-ID: <50368B7C.1030907@redhat.com> Date: Thu, 23 Aug 2012 15:58:52 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: GCC Patches Subject: [lra] patch to fix full bootstrap for LRA 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 fixes a failure during x86 bootstrap with Java language. The first bug occurs when we have BB containing only debug insns. LRA before the patch did not update live info correctly during processing EBBs containing such BBs. The second bug was in assigning wrong mode for x86 fp stack register inside subreg in debug insn. The patch was successfully bootstrapped on x86/x86-64. Committed as rev. 190629. 2012-08-23 Vladimir Makarov * lra-constraints.c (update_ebb_live_info): Process debug insn too. * lra-spills.c (lra_hard_reg_substitution): Call alter_subreg with true only for non-debug insn. Index: lra-spills.c =================================================================== --- lra-spills.c (revision 190448) +++ lra-spills.c (working copy) @@ -590,7 +590,7 @@ lra_hard_reg_substitution (void) if (GET_CODE (op) == SUBREG && REG_P (SUBREG_REG (op))) { lra_assert (REGNO (SUBREG_REG (op)) < FIRST_PSEUDO_REGISTER); - alter_subreg (id->operand_loc[i], true); + alter_subreg (id->operand_loc[i], ! DEBUG_INSN_P (insn)); lra_update_dup (id, i); insn_change_p = true; } Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 190448) +++ lra-constraints.c (working copy) @@ -4255,7 +4255,7 @@ update_ebb_live_info (rtx head, rtx tail curr_insn = prev_insn) { prev_insn = PREV_INSN (curr_insn); - if (! NONDEBUG_INSN_P (curr_insn)) + if (! INSN_P (curr_insn)) continue; curr_bb = BLOCK_FOR_INSN (curr_insn); if (curr_bb != prev_bb) @@ -4291,6 +4291,8 @@ update_ebb_live_info (rtx head, rtx tail prev_bb = curr_bb; bitmap_and (&live_regs, &check_only_regs, DF_LR_OUT (curr_bb)); } + if (DEBUG_INSN_P (curr_insn)) + continue; curr_id = lra_get_insn_recog_data (curr_insn); remove_p = false; if ((set = single_set (curr_insn)) != NULL_RTX && REG_P (SET_DEST (set))