From: Richard Sandiford <rdsandiford@googlemail.com>
To: Jeff Law <law@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 0/5] Cache recog_op_alt by insn code, take 2
Date: Wed, 04 Jun 2014 17:39:00 -0000 [thread overview]
Message-ID: <87egz44lrl.fsf@talisman.default> (raw)
In-Reply-To: <538E4067.2020908@redhat.com> (Jeff Law's message of "Tue, 03 Jun 2014 15:38:47 -0600")
Jeff Law <law@redhat.com> writes:
> On 05/31/14 03:02, Richard Sandiford wrote:
>> A second difference was that preprocess_constraints skips disabled
>> alternatives while LRA's setup_operand_alternative doesn't; LRA just
>> checks for disabled alternatives when walking the array instead.
>> That should make no difference in practice, but since the LRA approach
>> would also make it easier to precompute the array at build time,
>> I thought it would be a better way to go. It also gives a cleaner
>> interface: we can have a preprocess_insn_constraints function that
>> takes a (define_insn-based) insn and returns the operand_alternative
>> information without any global state.
> Sounds good. Do you think prebuilding those arrays once at build time
> is likely to have a measurable impact? I realize you probably haven't
> done measurements, just looking for your gut instinct here.
I have a local patch that does it, but unfortunately it doesn't seem to
make a measurable difference. I'll try measuring it again once other
lower-hanging fruit are out of the way.
>> Also, I hadn't realised that a define_insn with no constraints
>> at all has 0 alternatives rather than 1. Some passes nevertheless
>> unconditionally access the recog_op_alt information for alternative
>> which_alternative.
>>
>> I could have fixed that by making n_alternatives always be >= 1
>> in the static insn table. Several places do have fast paths for
>> n_alternatives == 0 though, so I thought it would be better to
>> handle the 0 alternative case in preprocess_constraints as well.
>> All it needs is a MIN (..., 1).
> Funny thing is I suspect the n_alternatives == 0 case is rare in
> practice though.
Yeah, probably. :-)
Thanks,
Richard
prev parent reply other threads:[~2014-06-04 17:39 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
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 [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=87egz44lrl.fsf@talisman.default \
--to=rdsandiford@googlemail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@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).