From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38808 invoked by alias); 2 Jun 2015 18:55:23 -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 38788 invoked by uid 89); 2 Jun 2015 18:55:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,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; Tue, 02 Jun 2015 18:55:22 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id F1BF32C62CF; Tue, 2 Jun 2015 18:55:20 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-154.phx2.redhat.com [10.3.113.154]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t52ItJI1024586; Tue, 2 Jun 2015 14:55:20 -0400 Message-ID: <556DFC17.90204@redhat.com> Date: Tue, 02 Jun 2015 19:16:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Kugan , "gcc-patches@gcc.gnu.org" Subject: Re: [PR65768] Check rtx_cost when propagating constant References: <552E1907.4090708@linaro.org> <555436B3.6070900@linaro.org> <5567892C.2010907@redhat.com> <5568081A.4090103@linaro.org> <5569429C.3050200@redhat.com> <556BC156.8040209@linaro.org> In-Reply-To: <556BC156.8040209@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00240.txt.bz2 On 05/31/2015 08:20 PM, Kugan wrote: > > > On 30/05/15 14:54, Jeff Law wrote: >> On 05/29/2015 12:32 AM, Kugan wrote: >>>>>> >>>>>> PR target/65768 >>>>>> * cprop.c (try_replace_reg): Check cost of constants before >>>>>> propagating. >>>> I should have also noted, fresh bootstrap & regression test is needed >>>> too. >>> >>> Thanks Jeff for the comments. I did a fresh bootstrap and regression >>> testing on x86_64-linux-gnu with no new regression. I will wait for >>> you ACK. >> Can you address the 3 issues in my prior message? I'll include them >> here for clarity: >> >> -- >> >> The "const_p" variable is poorly named, though I can kindof see how you >> settled on it. Maybe "check_rtx_costs" or something along those lines >> would be better. >> >> The comment for the second hunk would probably be better as: >> >> /* If TO is a constant, check the cost of the set after propagation >> to the cost of the set before the propagation. If the cost is >> higher, then do not replace FROM with TO. */ >> >> >> You should try to produce a testcase where this change shows a code >> generation improvement. Given we're checking target costs, that test >> will naturally be target specific. But please do try. >> >> So with the two nits fixed and a testcase, I think this can go forward. >> -- >> > > Thanks Jeff and apologies for missing your previous email. I have now > fixed the comments as you suggested and changed the PR target/65768 > testcase such that it tests this case. > > I will commit it if there is no objections to this. No objections. Thanks for your patience on this! jeff