public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	       Kyrill Tkachov <kyrylo.tkachov@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][combine][obvious] Use std::swap instead of manually swapping
Date: Mon, 27 Apr 2015 16:07:00 -0000	[thread overview]
Message-ID: <553E5ECD.2090704@redhat.com> (raw)
In-Reply-To: <20150427143752.GA19607@gate.crashing.org>

On 04/27/2015 08:37 AM, Segher Boessenkool wrote:
> On Mon, Apr 27, 2015 at 10:55:17AM +0100, Kyrill Tkachov wrote:
>> Precedents suggest these changes are considered obvious.
>> So I'll commit this in a couple of days unless someone objects.
>
> Yes it's obvious.  One tiny thing...
>
>> @@ -9062,7 +9061,7 @@ known_cond (rtx x, enum rtx_code cond, rtx reg, rtx val)
>>     else if (COMPARISON_P (x) || COMMUTATIVE_ARITH_P (x))
>>       {
>>         if (rtx_equal_p (XEXP (x, 0), val))
>> -	cond = swap_condition (cond), temp = val, val = reg, reg = temp;
>> +	cond = swap_condition (cond), std::swap (val, reg);
>>
>>         if (rtx_equal_p (XEXP (x, 0), reg) && rtx_equal_p (XEXP (x, 1), val))
>>   	{
>
> Might as well write this as two statements, like everywhere else, e.g.
Agreed.  I really dislike using ',' like is shown above from a 
readability standpoint.

jeff

      parent reply	other threads:[~2015-04-27 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  9:55 Kyrill Tkachov
2015-04-27 14:38 ` Segher Boessenkool
2015-04-27 14:58   ` Kyrill Tkachov
2015-04-27 16:07   ` Jeff Law [this message]

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=553E5ECD.2090704@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kyrylo.tkachov@arm.com \
    --cc=segher@kernel.crashing.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).