From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100963 invoked by alias); 18 May 2015 20:27:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 100952 invoked by uid 89); 18 May 2015 20:27:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 18 May 2015 20:27:25 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 7C3F98E786; Mon, 18 May 2015 20:27:24 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-21.phx2.redhat.com [10.3.113.21]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4IKRN6j004882; Mon, 18 May 2015 16:27:23 -0400 Message-ID: <555A4B2B.1070002@redhat.com> Date: Mon, 18 May 2015 20:33:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Re: [3/9] Clean up df_ref_change_reg_with_loc References: <87oalhu59s.fsf@e105548-lin.cambridge.arm.com> <87a8x1u4zf.fsf@e105548-lin.cambridge.arm.com> In-Reply-To: <87a8x1u4zf.fsf@e105548-lin.cambridge.arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg01619.txt.bz2 On 05/18/2015 12:15 PM, Richard Sandiford wrote: > This patch cleans up the interface to df_ref_change_reg_with_loc. > The function is used only by SET_REGNO_RAW, so the old regno is > always REGNO (x) and the caller always goes on to set REGNO. > (And the fuction doesn't make much sense otherwise.) > > The patch therefore gets df_ref_change_reg_with_loc to work out the old > regno itself and to install the new register number once it's done. > > The check for the old register being -1 was redundant. Only expr.c > and postreload.c create -1 registers ("fixed" in a later patch). > Both sites are just creating temporary registers in order to query > backend hooks and neither site needs the check. expr.c does use > SET_REGNO and so does go through this function, but only at a time > when there's no df information. (And it wouldn't work if the df > machinery were set up, since any change after the first would > look like a "normal" change.) postreload.c uses SET_REGNO_RAW > and so bypasses the code altogether. > > expr.c bypasses the code too by the end of the series. > > > gcc/ > * df.h (df_ref_change_reg_with_loc): Remove old_regno parameter. > Change type of new_regno to unsigned int. > * df-scan.c (df_ref_change_reg_with_loc_1): Change type of > new_regno to unsigned int. > (df_ref_change_reg_with_loc): Remove old_regno parameter. > Change type of new_regno to unsigned int. Use SET_REGNO_RAW. > * rtl.h (SET_REGNO): Update call to df_ref_change_reg_with_loc. > (SET_REGNO_RAW): Add space after ",". OK. jeff