Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-11 Thread 钟居哲
Hi, Richards. Could you take a look at this patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618241.html Thanks juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-05-11 20:42 To: juzhe.zhong\@rivai.ai CC: gcc-patches; rguenther Subject: Re: [PATCH V4] VECT: Add decrement IV ite

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-11 Thread juzhe.zh...@rivai.ai
Thanks. I have read rgroup descriptions again. Still I am not fully understand it clearly, bear with me :) I don't known how to differentiate Case 2 and Case 3. Case 2 is multiple rgroup for SLP. Case 3 is multiple rgroup for non-SLP (VEC_PACK_TRUNC) Is it correct: case 2: rgc->max_nscalarper_it

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-11 Thread juzhe.zh...@rivai.ai
Oh, I see. But I saw there is a variable using_partial_vectors_p in the loop data structure. Can I add a variable call using_select_vl_p ? Since it may increase the size of data structure, I am not sure whether it is appropriate. Thanks. juzhe.zh...@rivai.ai From: Richard Sandiford Date: 202

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-11 Thread juzhe.zh...@rivai.ai
Hi, Richard. Since create_iv has been approved and soon will be commited after we bootstrap && regression. Now, I plan to send patch for "decrement IV". After reading your comments, I have several questions: 1. >if (use_bias_adjusted_len) > return rgl->bias_adjusted_ctrl; > + else if

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-10 Thread juzhe.zh...@rivai.ai
Thank you so much. Can you take a look at this patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618110.html Thanks. juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-05-11 12:50 To: 钟居哲 CC: gcc-patches; rguenther Subject: Re: [PATCH V4] VECT: Add decrement IV iteration loop con

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-10 Thread 钟居哲
I am sorry that I am still confused about that. Is this what you want ? bool use_minus_p = TREE_CODE (step) == INTEGER_CST && ((TYPE_UNSIGNED (TREE_TYPE (step)) && tree_int_cst_lt (step1, step)) || (!TYPE_UNSIGNED (TREE_TYPE (step)) && !tree_expr_nonnegative_warnv_p (step

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-10 Thread 钟居哲
Thanks Richard. I am planning to seperate a patch with only creat_iv stuff only. Are you suggesting that I remove "tree_code incr_op = code;" Use the argument directly ? I saw the codes here: /* For easier readability of the created code, produce MINUS_EXPRs when suitable. */ if (TREE_

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-09 Thread 钟居哲
type, factor)); + if (seq) + gsi_insert_seq_before (gsi, seq, GSI_SAME_STMT); + } + return loop_len; +} else return rgl->controls[index]; }Thansk. juzhe.zh...@rivai.ai From: juzhe.zh...@rivai.ai Date: 2023-05-09 21:27 To: richard.sandiford CC: gcc

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-09 Thread juzhe.zh...@rivai.ai
Thanks, Richard. >> Could you go into more details about this? I imagined that for case 3, >> there would be a single SELECT_VL that decides how many scalar iterations >> will be handled by the current vector iteration, then we would "expand" >> the result (using MIN_EXPRs) to the multi-control c

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-09 Thread juzhe.zh...@rivai.ai
Hi,Richards. Would you mind reviewing this patch? Thanks. juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-05-07 23:19 To: juzhe.zhong; gcc-patches CC: richard.sandiford; rguenther Subject: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support On 5/4/23 07:

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-08 Thread juzhe.zh...@rivai.ai
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

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-07 Thread juzhe.zh...@rivai.ai
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

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-07 Thread 钟居哲
>> It's been pretty standard to stick with just PLUS_EXPR for this stuff >> and instead negate the constant to produce the same effect as >> MINUS_EXPR. Is there a reason we're not continuing that practice? >> Sorry if you've answered this already -- if you have, you can just point >> me at the pr