From: Richard Sandiford <richard.sandiford@arm.com>
To: 钟居哲 <juzhe.zhong@rivai.ai>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
vmakarov <vmakarov@redhat.com>,
kito.cheng <kito.cheng@sifive.com>
Subject: Re: [PATCH 0/5] Add support for operand-specific alignment requirements
Date: Thu, 23 Nov 2023 18:18:36 +0000 [thread overview]
Message-ID: <mptr0kg5o5f.fsf@arm.com> (raw)
In-Reply-To: <45D3DBF6E64B786B+2023112306322682829061@rivai.ai> (=?utf-8?B?IumSn+WxheWTsiIncw==?= message of "Thu, 23 Nov 2023 06:32:27 +0800")
钟居哲 <juzhe.zhong@rivai.ai> writes:
> Hi, Richard.
>
> Current define_mode_attr can only map an attribute for a mode.
> I wonder whether we can map a mode to multiple attributes ?
>
> E.g. (define_mode_attr dest_constraint [(V16QI "&vr")])
>
> But I want it to be:
>
> (define_mode_attr dest_constraint [(V16QI (TARGET_MIN_VLEN <= 128 "vr") (TARGET_MIN_VLEN > 128 "&vr")) ])
>
> It seems that we can't achieve this for now. Would it be possible we exend it in GCC-15 ?
That construct doesn't seem particularly natural to me. Could you explain
(conceptually) what kind of insn patterns you need?
Thanks,
Richard
>
>
> juzhe.zhong@rivai.ai
>
> From: Richard Sandiford
> Date: 2023-11-22 18:08
> To: juzhe.zhong\@rivai.ai
> CC: gcc-patches; vmakarov\@redhat.com; kito.cheng
> Subject: Re: [PATCH 0/5] Add support for operand-specific alignment requirements
> "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai> writes:
>> Hi, Richard.
>>
>> Thanks for supporting register filter in IRA/LRA.
>> I found it is useful for RVV since we have a set of widen operations that allow source register overlap highpart of dest register group
>>
>> For example, if vsext.vf2 v0(dest consume reg v0 and reg v1), v1 (source consume v1 only)
>> I want to support the highpart overlap above. (Currently, we don't any overlap between source and dest in such instructions).
>>
>> So, I wonder whether we can pass "machine_mode" into register filter. Ok, I think it's too late since stage 1 closes. I wonder we can add it in GCC-15?
>
> I think adding a mode would add too much overhead. The mode would be
> the mode of the operand, but with subregs, the mode of the operand can
> be different from the mode of the RA allocno. So it would no longer
> be enough for the RA to calculate a bitmask of filters. It would need
> ro remember which modes are used with those filters.
>
> We'd also need to turn the current HARD_REG_SETs into [MAX_MACHINE_MODE]
> arrays of HARD_REG_SETs. (And there are now more than 256 machine modes
> for riscv.)
>
> The pattern that uses the constraints should already "know" the mode.
> So if possible, I think it would be better to use different constraints
> for different modes, using define_mode_attrs.
>
> Thanks,
> Richard
>
next prev parent reply other threads:[~2023-11-23 18:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 9:47 juzhe.zhong
2023-11-22 10:08 ` Richard Sandiford
2023-11-22 22:32 ` 钟居哲
2023-11-23 18:18 ` Richard Sandiford [this message]
2023-11-24 6:42 ` juzhe.zhong
2023-11-24 9:55 ` Richard Sandiford
-- strict thread matches above, loose matches on Subject: below --
2023-11-12 14:52 Richard Sandiford
2023-11-14 0:01 ` Vladimir Makarov
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=mptr0kg5o5f.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@sifive.com \
--cc=vmakarov@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).