Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2022-01-10 Thread Richard Biener via Gcc-patches
On Mon, 10 Jan 2022, Andre Vieira (lists) wrote: > Hi, > > I don't think I ever ended up posting the rebased version on top of the > epilogue mode patch. So here it is, I think I had a conditional OK if I split > the epilogue mode patch, but just want to double check this is OK for trunk? Yes, I

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2022-01-10 Thread Andre Vieira (lists) via Gcc-patches
Hi, I don't think I ever ended up posting the rebased version on top of the epilogue mode patch. So here it is, I think I had a conditional OK if I split the epilogue mode patch, but just want to double check this is OK for trunk? gcc/ChangeLog:     * tree-vect-loop.c (vect_estimate_mi

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-30 Thread Richard Biener via Gcc-patches
On Tue, 30 Nov 2021, Andre Vieira (lists) wrote: > > On 25/11/2021 12:46, Richard Biener wrote: > > Oops, my fault, yes, it does. I would suggest to refactor things so > > that the mode_i = first_loop_i case is there only once. I also wonder > > if all the argument about starting at 0 doesn't a

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-30 Thread Andre Vieira (lists) via Gcc-patches
On 25/11/2021 12:46, Richard Biener wrote: Oops, my fault, yes, it does. I would suggest to refactor things so that the mode_i = first_loop_i case is there only once. I also wonder if all the argument about starting at 0 doesn't apply to the not unrolled LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-25 Thread Richard Biener via Gcc-patches
On Thu, 25 Nov 2021, Andre Vieira (lists) wrote: > > On 24/11/2021 11:00, Richard Biener wrote: > > On Wed, 24 Nov 2021, Andre Vieira (lists) wrote: > > > >> On 22/11/2021 12:39, Richard Biener wrote: > >>> + if (first_loop_vinfo->suggested_unroll_factor > 1) > >>> +{ > >>> + if (LOOP_V

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-25 Thread Andre Vieira (lists) via Gcc-patches
On 24/11/2021 11:00, Richard Biener wrote: On Wed, 24 Nov 2021, Andre Vieira (lists) wrote: On 22/11/2021 12:39, Richard Biener wrote: + if (first_loop_vinfo->suggested_unroll_factor > 1) +{ + if (LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P (first_loop_vinfo)) + { + if (d

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, 24 Nov 2021, Andre Vieira (lists) wrote: > > On 22/11/2021 12:39, Richard Biener wrote: > > + if (first_loop_vinfo->suggested_unroll_factor > 1) > > +{ > > + if (LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P (first_loop_vinfo)) > > + { > > + if (dump_enabled_p ()) > > +

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-24 Thread Andre Vieira (lists) via Gcc-patches
On 22/11/2021 12:39, Richard Biener wrote: + if (first_loop_vinfo->suggested_unroll_factor > 1) +{ + if (LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P (first_loop_vinfo)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_NOTE, vect_location, +

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-22 Thread Richard Biener via Gcc-patches
On Mon, 22 Nov 2021, Andre Vieira (lists) wrote: > > On 12/11/2021 13:12, Richard Biener wrote: > > On Thu, 11 Nov 2021, Andre Vieira (lists) wrote: > > > >> Hi, > >> > >> This is the rebased and reworked version of the unroll patch.  I wasn't > >> entirely sure whether I should compare the costs

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-22 Thread Andre Vieira (lists) via Gcc-patches
On 12/11/2021 13:12, Richard Biener wrote: On Thu, 11 Nov 2021, Andre Vieira (lists) wrote: Hi, This is the rebased and reworked version of the unroll patch.  I wasn't entirely sure whether I should compare the costs of the unrolled loop_vinfo with the original loop_vinfo it was unrolled of.

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-12 Thread Richard Biener via Gcc-patches
On Thu, 11 Nov 2021, Andre Vieira (lists) wrote: > Hi, > > This is the rebased and reworked version of the unroll patch.  I wasn't > entirely sure whether I should compare the costs of the unrolled loop_vinfo > with the original loop_vinfo it was unrolled of. I did now, but I wasn't too > sure wh

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-11-11 Thread Andre Vieira (lists) via Gcc-patches
Hi, This is the rebased and reworked version of the unroll patch.  I wasn't entirely sure whether I should compare the costs of the unrolled loop_vinfo with the original loop_vinfo it was unrolled of. I did now, but I wasn't too sure whether it was a good idea to... Any thoughts on this? Re

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-22 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > That said, the overall flow is OK now, some details about the > max_vf check and where to compute the unrolled VF needs to be > fleshed out. And then there's the main analysis loop which, > frankly, is a mess right now, even before your patch :/ Yeah, the loop is certain

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-22 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > On 15/10/2021 09:48, Richard Biener wrote: >> On Tue, 12 Oct 2021, Andre Vieira (lists) wrote: >> >>> Hi Richi, >>> >>> I think this is what you meant, I now hide all the unrolling cost >>> calculations >>> in the existing target hooks for costs. I did need to adj

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-21 Thread Richard Biener via Gcc-patches
On Wed, 20 Oct 2021, Andre Vieira (lists) wrote: > On 15/10/2021 09:48, Richard Biener wrote: > > On Tue, 12 Oct 2021, Andre Vieira (lists) wrote: > > > >> Hi Richi, > >> > >> I think this is what you meant, I now hide all the unrolling cost > >> calculations > >> in the existing target hooks for

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-20 Thread Andre Vieira (lists) via Gcc-patches
On 15/10/2021 09:48, Richard Biener wrote: On Tue, 12 Oct 2021, Andre Vieira (lists) wrote: Hi Richi, I think this is what you meant, I now hide all the unrolling cost calculations in the existing target hooks for costs. I did need to adjust 'finish_cost' to take the loop_vinfo so the target's

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-15 Thread Richard Biener via Gcc-patches
On Tue, 12 Oct 2021, Andre Vieira (lists) wrote: > Hi Richi, > > I think this is what you meant, I now hide all the unrolling cost calculations > in the existing target hooks for costs. I did need to adjust 'finish_cost' to > take the loop_vinfo so the target's implementations are able to set the

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-12 Thread Andre Vieira (lists) via Gcc-patches
Hi Richi, I think this is what you meant, I now hide all the unrolling cost calculations in the existing target hooks for costs. I did need to adjust 'finish_cost' to take the loop_vinfo so the target's implementations are able to set the newly renamed 'suggested_unroll_factor'. Also added t

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-04 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Thu, 30 Sep 2021, Andre Vieira (lists) wrote: > >> Hi, >> >> >> >> That just forces trying the vector modes we've tried before. Though I >> >> might >> >> need to revisit this now I think about it. I'm afraid it might be possible >> >> for >> >> this

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-01 Thread Richard Biener via Gcc-patches
On Thu, 30 Sep 2021, Andre Vieira (lists) wrote: > Hi, > > > >> That just forces trying the vector modes we've tried before. Though I might > >> need to revisit this now I think about it. I'm afraid it might be possible > >> for > >> this to generate an epilogue with a vf that is not lower than

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-09-30 Thread Andre Vieira (lists) via Gcc-patches
Hi, That just forces trying the vector modes we've tried before. Though I might need to revisit this now I think about it. I'm afraid it might be possible for this to generate an epilogue with a vf that is not lower than that of the main loop, but I'd need to think about this again. Either way