From: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
To: linkw <linkw@linux.ibm.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
rguenther <rguenther@suse.de>,
richard.sandiford <richard.sandiford@arm.com>
Subject: Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support
Date: Mon, 8 May 2023 16:25:39 +0800 [thread overview]
Message-ID: <27F85CFDD4997146+2023050816253862537464@rivai.ai> (raw)
In-Reply-To: <84bdb3ca-bebd-2dd4-c737-29c027e45cd2@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2822 bytes --]
Hi, Kewen.
I have tried to implement "decrement IV" feature and incorporate into "vect_set_loop_controls_directly".
Since the implementation is quite different from vect_set_loop_controls_directly, it will make vect_set_loop_controls_directly
very complicated sometimes it makes me very hard to debug when I am testing.
I am not sure but I can try again.
This patch isolated those implementation into a single function "vect_set_loop_controls_by_select_vl" which makes Richards
easier to review codes. Well, I think I can try again to incorporate those codes into "vect_set_loop_controls_directly" when they
finish the review process of "vect_set_loop_controls_by_select_vl".
Thanks.
juzhe.zhong@rivai.ai
From: Kewen.Lin
Date: 2023-05-08 15:55
To: juzhe.zhong@rivai.ai
CC: gcc-patches; rguenther; richard.sandiford
Subject: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support
Hi Juzhe,
> Hi, Kewen.
>
>>> Sorry for chiming in, I had some concern here.
>>> We already have some handlings for partial vector in length in vect_set_loop_controls_directly
>>>(actually it deals with both mask and length), the proposed vect_set_loop_controls_by_select_vl
>>>for select_vl looks like a variant for partial vector in length (comparing to the normal MIN),
>>>and also adopts decrement IV. IMHO, it seems better to modify/extend the current handling in
>>>vect_set_loop_controls_directly for length, or factor out the handlings for length there and
>>>extend the factored one. Otherwise, it means we have two sets of handlings for partial vector
>>>in lengths, it looks bad to maintain. As the previous discussion, adopting decrement IV is an
>>>enhancement for loop control, it's good for both cases w/ or w/o select_vl. If the above
>>>understanding is correct, the possible steps seem to be:
>>> - factor out the handling for length (* optional)
>>> - modify it with decrement IV
>>> - extend it with select_vl.
>>>In future if some RVV vendor wants to degenerate select_vl to min, it can just adopt the same
>>>handlings with min by not defining select_vl optab.
>
> You mean like this:
> doing this inside vect_set_loop_controls_directly ?
> if (use_while_len_p)
> return vect_set_loop_controls_by_while_len(...)
No, I meant either factoring out those handlings for partial vector in length in function
vect_set_loop_controls_directly to one separated function like: vect_set_loop_controls_directly_length
and rename the existing one to vect_set_loop_controls_directly_mask, or keep the existing
vect_set_loop_controls_directly for both mask and length but modify/extend the part for length.
If there is no much code to share between mask and length, the former may be better.
BR,
Kewen
next prev parent reply other threads:[~2023-05-08 8:26 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 13:25 juzhe.zhong
2023-05-05 23:41 ` 钟居哲
2023-05-09 12:59 ` Richard Sandiford
2023-05-09 13:27 ` juzhe.zhong
2023-05-09 14:34 ` 钟居哲
2023-05-07 15:19 ` Jeff Law
2023-05-07 21:54 ` 钟居哲
2023-05-09 10:52 ` juzhe.zhong
2023-05-08 5:35 ` Kewen.Lin
2023-05-08 6:27 ` juzhe.zhong
2023-05-08 7:55 ` Kewen.Lin
2023-05-08 8:25 ` juzhe.zhong [this message]
2023-05-10 16:45 ` Richard Sandiford
2023-05-10 21:00 ` 钟居哲
2023-05-10 21:28 ` Richard Sandiford
2023-05-10 22:51 ` 钟居哲
2023-05-11 4:50 ` Richard Sandiford
2023-05-11 5:14 ` juzhe.zhong
2023-05-11 10:11 ` juzhe.zhong
2023-05-11 11:04 ` Richard Sandiford
2023-05-11 11:21 ` juzhe.zhong
2023-05-11 11:29 ` Richard Sandiford
2023-05-11 12:08 ` juzhe.zhong
2023-05-11 12:42 ` Richard Sandiford
2023-05-11 23:12 ` 钟居哲
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=27F85CFDD4997146+2023050816253862537464@rivai.ai \
--to=juzhe.zhong@rivai.ai \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.com \
--cc=rguenther@suse.de \
--cc=richard.sandiford@arm.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).