From: Jeff Law <law@redhat.com>
To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com
Subject: Re: Require '%' to be at the beginning of a constraint string
Date: Fri, 30 May 2014 16:24:00 -0000 [thread overview]
Message-ID: <5388B0C4.8050605@redhat.com> (raw)
In-Reply-To: <8738ftbs3o.fsf@talisman.default>
On 05/28/14 13:50, Richard Sandiford wrote:
> Thanks for the review.
>
> Jeff Law <law@redhat.com> writes:
>> On 05/26/14 13:21, Richard Sandiford wrote:
>>>> If we're going to change it, then clearly the docs need to change and
>>>> ideally we'd statically check the port's constraints during the build
>>>> process to ensure they meet the tighter definition.
>>>
>>> OK, how does this look? I built a cc1 for one target per config/
>>> directory to (try to) check that there were no remaining cases.
>>>
>>> This means that we will silently ignore '%'s that are embedded in the
>>> middle of an asm constraint string, but in a way that's already true for
>>> most places that check for commutativity. An error seems a bit extreme
>>> when '%' is only a hint. If we want a warning, what should the option
>>> be called? And should it be under -Wall, -Wextra, or on by default?
>>>
>>> Tested on x86_64-linux-gnu. OK to install?
>> OK. My initial thought on adding a warning was to weed out bad
>> constraints. You've already done that for the in-tree ports. I'm a lot
>> less inclined to do much more here to help the out-of-tree ports, so
>> upon further review, let's not worry about the warning unless you've
>> already got it ready to go :-)
>
> Well, the new genoutput.c error should catch problems in out-of-tree ports.
Right.
> It's just asms where the non-initial '%'s would be silently accepted
> and have no effect.
Right. And I believe that it's conservatively correct -- so we're OK
here as well.
>
> David W suggested off-list that I add "Only input operands can use
> @samp{%}." to the documention as well. That seemed like it was
> obviously an improvement so I applied the patch with that change (below).
Funny I was thinking about that when looking at the arc changes. I saw
the '%' on operand0 and was confused thinking it made no sense to have a
'%' for an output operand. Then I realized that 0/1 were inputs and 2
was the output.
Thanks for pushing this through.
jeff
next prev parent reply other threads:[~2014-05-30 16:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 8:19 RFA: cache recog_op_alt by insn code Richard Sandiford
2014-05-20 18:04 ` Jeff Law
2014-05-26 19:21 ` Require '%' to be at the beginning of a constraint string Richard Sandiford
2014-05-27 17:41 ` Jeff Law
2014-05-28 19:50 ` Richard Sandiford
2014-05-30 16:24 ` Jeff Law [this message]
2014-05-31 9:02 ` [PATCH 0/5] Cache recog_op_alt by insn code, take 2 Richard Sandiford
2014-05-31 9:06 ` [PATCH 1/5] Flatten recog_op_alt and reorder entries Richard Sandiford
2014-06-03 21:50 ` Jeff Law
2014-05-31 9:09 ` [PATCH 2/5] Don't modify recog_op_alt after preprocess_constraints Richard Sandiford
2014-06-03 21:53 ` Jeff Law
2014-05-31 9:15 ` [PATCH 3/5] Make recog_op_alt consumers check the enabled attribute Richard Sandiford
2014-06-03 21:58 ` Jeff Law
2014-06-04 17:37 ` Richard Sandiford
2014-05-31 9:17 ` [PATCH 4/5] Cache recog_op_alt by insn code: main patch Richard Sandiford
2014-06-03 22:01 ` Jeff Law
2014-05-31 9:23 ` [PATCH 5/5] Reuse recog_op_alt cache in LRA Richard Sandiford
2014-06-03 22:02 ` Jeff Law
2014-06-03 21:38 ` [PATCH 0/5] Cache recog_op_alt by insn code, take 2 Jeff Law
2014-06-04 17:39 ` Richard Sandiford
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=5388B0C4.8050605@redhat.com \
--to=law@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rdsandiford@googlemail.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).