Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-28 Thread Segher Boessenkool
On Wed, May 27, 2020 at 10:20:18AM +0200, Richard Biener wrote: > > How about "Var(flag_cunroll_grow_size) EnabledBy(funroll-loops || > > funroll-all-loops || fpeel-loops)" Or flag_cunroll_allow_grow_size? > > > > And then using this flags as: > > unsigned int val = tree_unroll_loops_completely (

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-28 Thread Jiufu Guo via Gcc-patches
Richard Biener writes: > On Wed, May 27, 2020 at 6:36 AM Jiufu Guo wrote: >> >> Segher Boessenkool writes: >> >> > Hi! >> > >> > On Tue, May 26, 2020 at 08:58:13AM +0200, Richard Biener wrote: >> >> On Mon, May 25, 2020 at 7:44 PM Segher Boessenkool >> >> wrote: >> >> > Yes, cunroll does not h

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-27 Thread Richard Biener via Gcc-patches
On Wed, May 27, 2020 at 6:36 AM Jiufu Guo wrote: > > Segher Boessenkool writes: > > > Hi! > > > > On Tue, May 26, 2020 at 08:58:13AM +0200, Richard Biener wrote: > >> On Mon, May 25, 2020 at 7:44 PM Segher Boessenkool > >> wrote: > >> > Yes, cunroll does not have its own option, and that is a pr

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-26 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: > Hi! > > On Tue, May 26, 2020 at 08:58:13AM +0200, Richard Biener wrote: >> On Mon, May 25, 2020 at 7:44 PM Segher Boessenkool >> wrote: >> > Yes, cunroll does not have its own option, and that is a problem. But >> > that is easy to fix! Either with an option, or ju

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-26 Thread Segher Boessenkool
Hi! On Tue, May 26, 2020 at 08:58:13AM +0200, Richard Biener wrote: > On Mon, May 25, 2020 at 7:44 PM Segher Boessenkool > wrote: > > Yes, cunroll does not have its own option, and that is a problem. But > > that is easy to fix! Either with an option, or just with params (the > > option wouldn'

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-26 Thread Jiufu Guo via Gcc-patches
Richard Biener writes: > On Mon, May 25, 2020 at 7:44 PM Segher Boessenkool > wrote: >> >> On Mon, May 25, 2020 at 02:39:54PM +0200, Richard Biener wrote: >> > On Fri, May 22, 2020 at 6:54 PM Segher Boessenkool >> > wrote: >> > > > The split above allows the "bug" to be fixed (even on the branc

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-25 Thread Richard Biener via Gcc-patches
On Mon, May 25, 2020 at 7:44 PM Segher Boessenkool wrote: > > On Mon, May 25, 2020 at 02:39:54PM +0200, Richard Biener wrote: > > On Fri, May 22, 2020 at 6:54 PM Segher Boessenkool > > wrote: > > > > The split above allows the "bug" to be fixed (even on the branch) > > > > without introducing eve

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-25 Thread Segher Boessenkool
On Mon, May 25, 2020 at 02:39:54PM +0200, Richard Biener wrote: > On Fri, May 22, 2020 at 6:54 PM Segher Boessenkool > wrote: > > > The split above allows the "bug" to be fixed (even on the branch) > > > without introducing even more target specialities. > > > > So does any split. Or I don't see

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-25 Thread Richard Biener via Gcc-patches
On Fri, May 22, 2020 at 6:54 PM Segher Boessenkool wrote: > > On Fri, May 22, 2020 at 01:22:10PM +0200, Richard Biener wrote: > > On Wed, May 20, 2020 at 10:37 PM Segher Boessenkool > > wrote: > > > > > > On Wed, May 20, 2020 at 12:30:30PM +0200, Richard Biener wrote: > > > > I think this is the

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-22 Thread Segher Boessenkool
On Fri, May 22, 2020 at 01:22:10PM +0200, Richard Biener wrote: > On Wed, May 20, 2020 at 10:37 PM Segher Boessenkool > wrote: > > > > On Wed, May 20, 2020 at 12:30:30PM +0200, Richard Biener wrote: > > > I think this is the wrong way to approach this. You're doing too many > > > things at once.

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-22 Thread Richard Biener via Gcc-patches
On Wed, May 20, 2020 at 10:37 PM Segher Boessenkool wrote: > > On Wed, May 20, 2020 at 12:30:30PM +0200, Richard Biener wrote: > > I think this is the wrong way to approach this. You're doing too many > > things at once. Try to fix the powerpc regression with the extra > > flag_rtl_unroll_loops,

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-21 Thread Jiufu Guo via Gcc-patches
Jiufu Guo writes: > Jan Hubicka writes: > >>> Segher Boessenkool writes: >>> >>> > On Wed, May 20, 2020 at 12:30:30PM +0200, Richard Biener wrote: >>> >> I think this is the wrong way to approach this. You're doing too many >>> >> things at once. Try to fix the powerpc regression with the ex

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-21 Thread Jiufu Guo via Gcc-patches
Jan Hubicka writes: >> Segher Boessenkool writes: >> >> > On Wed, May 20, 2020 at 12:30:30PM +0200, Richard Biener wrote: >> >> I think this is the wrong way to approach this. You're doing too many >> >> things at once. Try to fix the powerpc regression with the extra >> >> flag_rtl_unroll_lo

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-21 Thread Jan Hubicka
> Segher Boessenkool writes: > > > On Wed, May 20, 2020 at 12:30:30PM +0200, Richard Biener wrote: > >> I think this is the wrong way to approach this. You're doing too many > >> things at once. Try to fix the powerpc regression with the extra > >> flag_rtl_unroll_loops, that could be backporte

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-20 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: > On Wed, May 20, 2020 at 12:30:30PM +0200, Richard Biener wrote: >> I think this is the wrong way to approach this. You're doing too many >> things at once. Try to fix the powerpc regression with the extra >> flag_rtl_unroll_loops, that could be backported. Then you

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-20 Thread Segher Boessenkool
On Wed, May 20, 2020 at 12:30:30PM +0200, Richard Biener wrote: > I think this is the wrong way to approach this. You're doing too many > things at once. Try to fix the powerpc regression with the extra > flag_rtl_unroll_loops, that could be backported. Then you can > independently see whether e

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-20 Thread Richard Biener via Gcc-patches
On Wed, May 20, 2020 at 11:08 AM Jiufu Guo wrote: > > Richard Biener writes: > > > On Wed, May 20, 2020 at 5:56 AM Jiufu Guo via Gcc-patches > > wrote: > >> > >> Hi, > >> > >> In r10-4525, and r10-4161, loop unroller was enabled for simply loops at > >> -O2. > >> At the same time, the GIMPLE cu

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-20 Thread Jiufu Guo via Gcc-patches
Richard Biener writes: > On Wed, May 20, 2020 at 5:56 AM Jiufu Guo via Gcc-patches > wrote: >> >> Hi, >> >> In r10-4525, and r10-4161, loop unroller was enabled for simply loops at -O2. >> At the same time, the GIMPLE cunroll is also enabled, while it is not only >> for >> simple loops. This p

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-20 Thread Jiufu Guo via Gcc-patches
Richard Biener writes: > On Wed, May 20, 2020 at 10:27 AM Jiufu Guo wrote: >> >> Richard Biener writes: >> >> > On Wed, May 20, 2020 at 5:56 AM Jiufu Guo via Gcc-patches >> > wrote: >> >> >> >> Hi, >> >> >> >> In r10-4525, and r10-4161, loop unroller was enabled for simply loops at >> >> -O2.

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-20 Thread Richard Biener via Gcc-patches
On Wed, May 20, 2020 at 10:27 AM Jiufu Guo wrote: > > Richard Biener writes: > > > On Wed, May 20, 2020 at 5:56 AM Jiufu Guo via Gcc-patches > > wrote: > >> > >> Hi, > >> > >> In r10-4525, and r10-4161, loop unroller was enabled for simply loops at > >> -O2. > >> At the same time, the GIMPLE cu

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-20 Thread Jiufu Guo via Gcc-patches
Richard Biener writes: > On Wed, May 20, 2020 at 5:56 AM Jiufu Guo via Gcc-patches > wrote: >> >> Hi, >> >> In r10-4525, and r10-4161, loop unroller was enabled for simply loops at -O2. >> At the same time, the GIMPLE cunroll is also enabled, while it is not only >> for >> simple loops. This p

Re: [PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-20 Thread Richard Biener via Gcc-patches
On Wed, May 20, 2020 at 5:56 AM Jiufu Guo via Gcc-patches wrote: > > Hi, > > In r10-4525, and r10-4161, loop unroller was enabled for simply loops at -O2. > At the same time, the GIMPLE cunroll is also enabled, while it is not only for > simple loops. This patch introduces a hook to check if a lo

[PATCH 1/2] rs6000: tune cunroll for simple loops at O2

2020-05-19 Thread Jiufu Guo via Gcc-patches
Hi, In r10-4525, and r10-4161, loop unroller was enabled for simply loops at -O2. At the same time, the GIMPLE cunroll is also enabled, while it is not only for simple loops. This patch introduces a hook to check if a loop is suitable to unroll completely. The hook can be used to check if a loop