From: Richard Sandiford <rdsandiford@googlemail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Be less conservative in process_{output,input}_constraints (PR target/65689)
Date: Sun, 26 Apr 2015 11:11:00 -0000 [thread overview]
Message-ID: <87oambb0v8.fsf@googlemail.com> (raw)
In-Reply-To: <20150408210059.GZ19273@tucnak.redhat.com> (Jakub Jelinek's message of "Wed, 8 Apr 2015 23:00:59 +0200")
Jakub Jelinek <jakub@redhat.com> writes:
> Hi!
>
> Right now, stmt.c on constraints not hardcoded in it, and not
> define_{register,address,memory}_constraint just assumes the
> constraint might allow both reg and mem. Unfortunately, on some
> constraints which clearly can't allow either of those leads to errors
> at -O0, because the expander doesn't try so hard to expand it as
> EXPAND_INITIALIZER.
>
> The following patch is an attempt to handle at least the easy cases
> - define_constraint like:
> (define_constraint "S"
> "A constraint that matches an absolute symbolic address."
> (and (match_code "const,symbol_ref,label_ref")
> (match_test "aarch64_symbolic_address_p (op)")))
> where the match_code clearly proves that it never can match any REG/SUBREG,
> nor MEM, by teaching genpreds.c to emit an extra inline function that
> stmt.c can in process_{output,input}_constraint use for the unknown
> constraints.
>
> On x86_64/i686 this only detects constraint G as not allowing reg nor mem
> (it is match_code const_double), and V (plus < and >, but those are
> hardcoded in stmt.c already) that it allows mem but not reg.
> On aarch64, in the first category it detects several constraints.
Thanks for doing this.
How about reusing compute_predicate_codes from gensupport.c? It'd be
good to have a single function that understands how to get codes from
both predicate and constraint expressions rather than have slightly
different logic for the two.
Richard
next prev parent reply other threads:[~2015-04-26 11:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 21:01 Jakub Jelinek
2015-04-08 22:12 ` Segher Boessenkool
2015-04-08 22:16 ` Segher Boessenkool
2015-04-08 22:20 ` Jakub Jelinek
2015-04-09 6:58 ` Jakub Jelinek
2015-04-09 9:03 ` Jakub Jelinek
2015-04-26 11:11 ` Richard Sandiford [this message]
2016-01-12 12:30 ` James Greenhalgh
2016-01-12 12:37 ` Jakub Jelinek
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=87oambb0v8.fsf@googlemail.com \
--to=rdsandiford@googlemail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.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).