Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-17 Thread Kewen.Lin via Gcc-patches
on 2021/5/17 下午4:55, Richard Biener wrote: > On Thu, May 13, 2021 at 9:04 AM Kewen.Lin wrote: >> >> Hi! >> > But in the end the vector code shouldn't end up worse than the > scalar code with respect to IVs - the cases where it would should > be already costed. So I wonder if you have

Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-17 Thread Richard Biener via Gcc-patches
On Thu, May 13, 2021 at 9:04 AM Kewen.Lin wrote: > > Hi! > > >>> But in the end the vector code shouldn't end up worse than the > >>> scalar code with respect to IVs - the cases where it would should > >>> be already costed. So I wonder if you have specific examples > >>> where things go worse en

Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-13 Thread Kewen.Lin via Gcc-patches
Hi! >>> But in the end the vector code shouldn't end up worse than the >>> scalar code with respect to IVs - the cases where it would should >>> be already costed. So I wonder if you have specific examples >>> where things go worse enough for the heuristic to trigger? >>> >> >> One typical case t

Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-11 Thread Richard Biener via Gcc-patches
On Tue, May 11, 2021 at 12:50 PM Kewen.Lin wrote: > > Hi Richi, > > > OTOH we already pass scalar_stmt to individual add_stmt_cost, > > so not sure whether the context really matters. That said, > > the density test looks "interesting" ... the intent was that finish_cost > > might

Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-11 Thread Kewen.Lin via Gcc-patches
Hi Richi, > OTOH we already pass scalar_stmt to individual add_stmt_cost, > so not sure whether the context really matters. That said, > the density test looks "interesting" ... the intent was that finish_cost > might look at gathered data from add_stmt, not that it looks at >

Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-11 Thread Richard Biener via Gcc-patches
On Tue, May 11, 2021 at 9:10 AM Kewen.Lin wrote: > > Hi Richi, > > on 2021/5/10 下午9:55, Richard Biener wrote: > > On Sat, May 8, 2021 at 10:05 AM Kewen.Lin wrote: > >> > >> Hi Richi, > >> > >> Thanks for the comments! > >> > >> on 2021/5/7 下午5:43, Richard Biener wrote: > >>> On Fri, May 7, 2021 a

Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-11 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2021/5/10 下午10:08, Richard Sandiford wrote: > "Kewen.Lin via Gcc-patches" writes: >> on 2021/5/7 下午5:43, Richard Biener wrote: >>> On Fri, May 7, 2021 at 5:30 AM Kewen.Lin via Gcc-patches >>> wrote: Hi, When I was investigating density_test heuristics, I notice

Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-11 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2021/5/10 下午9:55, Richard Biener wrote: > On Sat, May 8, 2021 at 10:05 AM Kewen.Lin wrote: >> >> Hi Richi, >> >> Thanks for the comments! >> >> on 2021/5/7 下午5:43, Richard Biener wrote: >>> On Fri, May 7, 2021 at 5:30 AM Kewen.Lin via Gcc-patches >>> wrote: Hi, W

Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-10 Thread Richard Sandiford via Gcc-patches
"Kewen.Lin via Gcc-patches" writes: > on 2021/5/7 下午5:43, Richard Biener wrote: >> On Fri, May 7, 2021 at 5:30 AM Kewen.Lin via Gcc-patches >> wrote: >>> >>> Hi, >>> >>> When I was investigating density_test heuristics, I noticed that >>> the current rs6000_density_test could be used for single s

Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-10 Thread Richard Biener via Gcc-patches
On Sat, May 8, 2021 at 10:05 AM Kewen.Lin wrote: > > Hi Richi, > > Thanks for the comments! > > on 2021/5/7 下午5:43, Richard Biener wrote: > > On Fri, May 7, 2021 at 5:30 AM Kewen.Lin via Gcc-patches > > wrote: > >> > >> Hi, > >> > >> When I was investigating density_test heuristics, I noticed tha

[PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-08 Thread Kewen.Lin via Gcc-patches
Hi Richi, Thanks for the comments! on 2021/5/7 下午5:43, Richard Biener wrote: > On Fri, May 7, 2021 at 5:30 AM Kewen.Lin via Gcc-patches > wrote: >> >> Hi, >> >> When I was investigating density_test heuristics, I noticed that >> the current rs6000_density_test could be used for single scalar >>