public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@adacore.com>
To: Steven Bosscher <stevenb.gcc@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch] replace a bunch of equivalent checks for asm operands with a new function
Date: Tue, 02 Apr 2013 11:25:00 -0000	[thread overview]
Message-ID: <2614188.qgNTnJTDhJ@polaris> (raw)
In-Reply-To: <CABu31nPOq_39_=LPL8U8vpu7mZivAJ8DDoM_a-k6yHn+jO=Ycw@mail.gmail.com>

> This idiom: "if (GET_CODE (body) == ASM_INPUT || asm_noperands (body)
> 
> >= 0)" appears in multiple places. There's even one place where the
> 
> idiom above is used in reverse (making the GET_CODE... check
> redundant). A few more places to the equivalent by checking
> extract_asm_operands != NULL.

I think that the last point is not clear: asm_noperands can return -1 and yet 
extract_asm_operands has returned non-NULL.  And, at least in some cases, I 
think that the right predicate is extract_asm_operands.  In fact, I wonder 
whether in most cases the right combined predicate would be:

  GET_CODE (body) == ASM_INPUT || extract_asm_operands (body) != NULL

and asm_noperands only used when you really care about the operands.

> It made sense to me, at least, to replace those equivalent checks with
> a new function: insn_with_asm_operands_p().

The first hunk for config/ia64/ia64.c looks incorrect.

-- 
Eric Botcazou

  reply	other threads:[~2013-04-02 10:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 10:27 Steven Bosscher
2013-04-02 11:25 ` Eric Botcazou [this message]
2013-04-03  0:09   ` Steven Bosscher
2013-04-05 10:21     ` Eric Botcazou

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=2614188.qgNTnJTDhJ@polaris \
    --to=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=stevenb.gcc@gmail.com \
    /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).