From patchwork Wed Nov 11 08:50:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Suchanek X-Patchwork-Id: 542827 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id ECB091402A8 for ; Wed, 11 Nov 2015 19:50:52 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=np30/YXx; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=xn77AcGB+Dtvzr7HFCrfCjsTMUa76Tc8wW0+PEkFqmrTrqeD2cXVX jfQTLwr7Fiu7SI8IkYNEZ7qnP++JKe99XC0cX7PbkoW0LZpegqv80u5i99JrR9Ig qML/bGkJpbDftAgh2g2OEPmVOUd7jFaK2fT2YFcrfPQ2bov/I6+VHU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s=default; bh=z+Cjo9dVbngLpKH2npmJK0H0doc=; b=np30/YXxTeutOFN/+VnBER8O9cfa 9vT9EaFCj6hRtKmIH2N9h4T1PvDeWNGi6UxG3XQYVtO46MfA3C7XwS2XI1kfghHR ni3rIqiBLCdqLLmoSOwLWD7sDIZZhKqk82Cv3lqmJP9mGE/i0wf3vvkjArH6oTJv +u3+chpHiOl3whU= Received: (qmail 88565 invoked by alias); 11 Nov 2015 08:50:45 -0000 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 Received: (qmail 88546 invoked by uid 89); 11 Nov 2015 08:50:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Nov 2015 08:50:43 +0000 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Websense Email Security Gateway with ESMTPS id 055A7C1DCAB84; Wed, 11 Nov 2015 08:50:39 +0000 (GMT) Received: from HHMAIL01.hh.imgtec.org (10.100.10.19) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.235.1; Wed, 11 Nov 2015 08:50:40 +0000 Received: from hhmail02.hh.imgtec.org ([::1]) by HHMAIL01.hh.imgtec.org ([fe80::710b:f219:72bc:e0b3%28]) with mapi id 14.03.0235.001; Wed, 11 Nov 2015 08:50:40 +0000 From: Robert Suchanek To: Bernd Schmidt , James Greenhalgh , Christophe Lyon CC: "ebotcazou@adacore.com" , "gcc-patches@gcc.gnu.org" Subject: RE: [RFC][PATCH] Preferred rename register in regrename pass Date: Wed, 11 Nov 2015 08:50:39 +0000 Message-ID: References: <55FC2B8D.6000106@redhat.com> <56179FC6.3040503@redhat.com> <5640CA1E.3070205@redhat.com> <20151110174252.GA33923@arm.com> <56427655.7040408@redhat.com> In-Reply-To: <56427655.7040408@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes Hi, > I guess this is ok to stop the failures for now, but you may want to > move the check to the point where we set terminated_this_insn. Also, as > I pointed out earlier, clearing terminated_this_insn should probably > happen earlier. Here is the updated patch that I'm about to commit once the bootstrap finishes. Regards, Robert gcc/ * regname.c (scan_rtx_reg): Check the matching number of consecutive registers when tying chains. (build_def_use): Move terminated_this_insn earlier in the function. --- gcc/regrename.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/regrename.c b/gcc/regrename.c index d727dd9..d41410a 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -1068,7 +1068,9 @@ scan_rtx_reg (rtx_insn *insn, rtx *loc, enum reg_class cl, enum scan_actions act && GET_CODE (pat) == SET && GET_CODE (SET_DEST (pat)) == REG && GET_CODE (SET_SRC (pat)) == REG - && terminated_this_insn) + && terminated_this_insn + && terminated_this_insn->nregs + == REG_NREGS (recog_data.operand[1])) { gcc_assert (terminated_this_insn->regno == REGNO (recog_data.operand[1])); @@ -1593,6 +1595,7 @@ build_def_use (basic_block bb) enum rtx_code set_code = SET; enum rtx_code clobber_code = CLOBBER; insn_rr_info *insn_info = NULL; + terminated_this_insn = NULL; /* Process the insn, determining its effect on the def-use chains and live hard registers. We perform the following @@ -1749,8 +1752,6 @@ build_def_use (basic_block bb) scan_rtx (insn, &XEXP (note, 0), ALL_REGS, mark_read, OP_INOUT); - terminated_this_insn = NULL; - /* Step 4: Close chains for registers that die here, unless the register is mentioned in a REG_UNUSED note. In that case we keep the chain open until step #7 below to ensure