public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Kugan <kugan.vivekanandarajah@linaro.org>,
	       "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PR65768] Check rtx_cost when propagating constant
Date: Sat, 30 May 2015 05:47:00 -0000	[thread overview]
Message-ID: <5569429C.3050200@redhat.com> (raw)
In-Reply-To: <5568081A.4090103@linaro.org>

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.
--

  reply	other threads:[~2015-05-30  4:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15  7:53 Kugan
2015-04-15  9:05 ` Steven Bosscher
2015-04-15 11:18   ` Richard Biener
2015-04-17  3:19     ` Kugan
2015-05-14  5:57 ` Kugan
2015-05-28 21:52   ` Jeff Law
2015-05-28 21:55   ` Jeff Law
2015-05-29  7:46     ` Kugan
2015-05-30  5:47       ` Jeff Law [this message]
2015-06-01  2:20         ` Kugan
2015-06-02 19:16           ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5569429C.3050200@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kugan.vivekanandarajah@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).