From: Richard Sandiford <richard.sandiford@arm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: "Qian\, Jianhua" <qianjh@cn.fujitsu.com>,
"gcc\@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: A problem with one instruction multiple latencies and pipelines
Date: Mon, 14 Sep 2020 20:35:44 +0100 [thread overview]
Message-ID: <mpth7s05ey7.fsf@arm.com> (raw)
In-Reply-To: <20200914184152.GZ28786@gate.crashing.org> (Segher Boessenkool's message of "Mon, 14 Sep 2020 13:41:52 -0500")
Segher Boessenkool <segher@kernel.crashing.org> writes:
>> Although this looks/sounds complicated, the advantage is that everything
>> remains up-to-date. If we instead added a second attribute and only
>> defined it for instructions like *add_<shift>_<mode>, other instructions
>> (including config/arm instructions) would still have type alu_shift_imm
>> but would have a shift_imm_value of "none".
>
> I would make an attribute for the mode (or data size really), and one
> that says the insn uses shifted data (since many arm insns have that,
> just like record form on PowerPC is everywhere). And you can have that
> one filled "by magic" usually!
I don't think this is really answering my point above though.
What I meant is: we currently have several instructions in config/arm
and config/aarch64 that have type alu_shift_imm. If we add some new
on-the-side attributes A, but only update *some* of the alu_shift_imm
instructions to define A (either directly or indirectly), then the other
alu_shift_imm instructions will have the default values for A.
This probably isn't the intended effect. Ideally, every alu_shift_imm
instruction would specify correct attribute values for A (specifically,
to indicate whether the shift value is in [1, 4] or not).
In contrast, one advantage of replacing the existing alu_shift_imm type
with two new types is that any existing reference to the old type will
cause a build failure. So keeping everything in a single type
attributes gives us static type checking that the information for each
(former) alu_shift_imm instruction is complete. Similarly for any other
type that needs to be split in the same way.
I realise this won't convince you, and I'm not trying to. :-)
Thanks,
Richard
next prev parent reply other threads:[~2020-09-14 19:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 6:08 Qian, Jianhua
2020-09-07 7:40 ` Richard Biener
2020-09-07 8:45 ` Qian, Jianhua
2020-09-07 11:58 ` Richard Biener
2020-09-07 20:20 ` Richard Sandiford
2020-09-08 5:34 ` Qian, Jianhua
2020-09-09 21:22 ` Segher Boessenkool
2020-09-10 5:01 ` Qian, Jianhua
2020-09-10 10:04 ` Richard Sandiford
2020-09-10 23:00 ` Segher Boessenkool
2020-09-11 7:44 ` Richard Sandiford
2020-09-11 13:58 ` Segher Boessenkool
2020-09-14 5:41 ` Qian, Jianhua
2020-09-14 9:55 ` Richard Sandiford
2020-09-14 18:41 ` Segher Boessenkool
2020-09-14 19:35 ` Richard Sandiford [this message]
2020-09-14 22:14 ` Segher Boessenkool
2020-09-11 13:30 ` Richard Earnshaw
2020-09-14 2:53 ` Qian, Jianhua
2020-09-14 9:08 ` Richard Earnshaw
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=mpth7s05ey7.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=gcc@gcc.gnu.org \
--cc=qianjh@cn.fujitsu.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).