Re: [PATCH] Check calls before loop unrolling

2020-11-23 Thread Richard Biener via Gcc-patches
On Fri, Nov 20, 2020 at 7:11 PM Segher Boessenkool wrote: > > Hi! > > On Fri, Nov 20, 2020 at 04:22:47PM +0100, Jan Hubicka wrote: > > As you know I spend quite some time on inliner heuristics but even after > > the years I have no clear idea how the requirements differs from x86-64 > > to ppc, ar

Re: [PATCH] Check calls before loop unrolling

2020-11-20 Thread Segher Boessenkool
Hi! On Fri, Nov 20, 2020 at 04:22:47PM +0100, Jan Hubicka wrote: > As you know I spend quite some time on inliner heuristics but even after > the years I have no clear idea how the requirements differs from x86-64 > to ppc, arm and s390. Clearly compared to x86_64 prologues may get more > expensi

Re: [PATCH] Check calls before loop unrolling

2020-11-20 Thread Jan Hubicka
> On Thu, Nov 19, 2020 at 03:30:37PM -0700, Jeff Law wrote: > > > No, the vast majority of people will *not* (consciously) use them, > > > because the target defaults will set things to useful values. > > > > > > The compiler could use saner "generic" defaults perhaps, but those will > > > still no

Re: [PATCH] Check calls before loop unrolling

2020-11-20 Thread David Edelsohn via Gcc-patches
On Fri, Nov 20, 2020 at 2:48 AM Richard Biener wrote: > > On Fri, Nov 20, 2020 at 12:58 AM Segher Boessenkool > wrote: > > > > On Thu, Nov 19, 2020 at 03:30:37PM -0700, Jeff Law wrote: > > > > No, the vast majority of people will *not* (consciously) use them, > > > > because the target defaults w

Re: [PATCH] Check calls before loop unrolling

2020-11-19 Thread Richard Biener via Gcc-patches
On Fri, Nov 20, 2020 at 12:58 AM Segher Boessenkool wrote: > > On Thu, Nov 19, 2020 at 03:30:37PM -0700, Jeff Law wrote: > > > No, the vast majority of people will *not* (consciously) use them, > > > because the target defaults will set things to useful values. > > > > > > The compiler could use s

Re: [PATCH] Check calls before loop unrolling

2020-11-19 Thread Segher Boessenkool
On Thu, Nov 19, 2020 at 03:30:37PM -0700, Jeff Law wrote: > > No, the vast majority of people will *not* (consciously) use them, > > because the target defaults will set things to useful values. > > > > The compiler could use saner "generic" defaults perhaps, but those will > > still not be satisfa

Re: [PATCH] Check calls before loop unrolling

2020-11-19 Thread Jeff Law via Gcc-patches
On 11/19/20 1:01 PM, Segher Boessenkool wrote: > On Thu, Nov 19, 2020 at 12:53:27PM -0700, Jeff Law wrote: >> On 11/19/20 12:42 PM, Segher Boessenkool wrote: >>> On Thu, Nov 19, 2020 at 12:13:34PM -0700, Jeff Law wrote: On 8/31/20 9:33 PM, Jiufu Guo via Gcc-patches wrote: > guojiufu wr

Re: [PATCH] Check calls before loop unrolling

2020-11-19 Thread Segher Boessenkool
On Thu, Nov 19, 2020 at 12:53:27PM -0700, Jeff Law wrote: > On 11/19/20 12:42 PM, Segher Boessenkool wrote: > > On Thu, Nov 19, 2020 at 12:13:34PM -0700, Jeff Law wrote: > >> On 8/31/20 9:33 PM, Jiufu Guo via Gcc-patches wrote: > >>> guojiufu writes: > When unroll loops, if there are calls in

Re: [PATCH] Check calls before loop unrolling

2020-11-19 Thread Jeff Law via Gcc-patches
On 11/19/20 12:42 PM, Segher Boessenkool wrote: > On Thu, Nov 19, 2020 at 12:13:34PM -0700, Jeff Law wrote: >> On 8/31/20 9:33 PM, Jiufu Guo via Gcc-patches wrote: >>> guojiufu writes: When unroll loops, if there are calls inside the loop, those calls may raise negative impacts for un

Re: [PATCH] Check calls before loop unrolling

2020-11-19 Thread Segher Boessenkool
On Thu, Nov 19, 2020 at 12:13:34PM -0700, Jeff Law wrote: > On 8/31/20 9:33 PM, Jiufu Guo via Gcc-patches wrote: > > guojiufu writes: > >> When unroll loops, if there are calls inside the loop, those calls > >> may raise negative impacts for unrolling. This patch adds a param > >> param_max_unrol

Re: [PATCH] Check calls before loop unrolling

2020-11-19 Thread Jeff Law via Gcc-patches
On 8/31/20 9:33 PM, Jiufu Guo via Gcc-patches wrote: > guojiufu writes: > > Hi, > > In this patch, the default value of > param=max-unrolled-average-calls-x1 is '0', which means to unroll > a loop, there should be no call inside the body. Do I need to set the > default value to a bigger va

Re: [PATCH] Check calls before loop unrolling

2020-09-15 Thread Jiufu Guo via Gcc-patches
Hi all, This patch sets the default value to 16 for parameter max_unrolled_average_calls which could be used to restict calls in loop when unrolling. This default value(16) is a big number which keeps current behavior for almost all cases. Bootstrap and regtest pass on powerpc64le. Is this ok f

Re: [PATCH] Check calls before loop unrolling

2020-08-31 Thread Jiufu Guo via Gcc-patches
guojiufu writes: Hi, In this patch, the default value of param=max-unrolled-average-calls-x1 is '0', which means to unroll a loop, there should be no call inside the body. Do I need to set the default value to a bigger value (16?) for later tune? Biger value will keep the behavior unchange

Re: [PATCH] Check calls before loop unrolling

2020-08-24 Thread Jiufu Guo via Gcc-patches
On 2020-08-24 19:16, Jan Hubicka wrote: On Thu, Aug 20, 2020 at 6:35 AM guojiufu via Gcc-patches wrote: > > Hi, > > This patch is checking the _average_ number of calls which is the > summary of call numbers multiply the possibility of the call maybe > executed. The _average_ number could be a

Re: [PATCH] Check calls before loop unrolling

2020-08-24 Thread Jan Hubicka
> On Thu, Aug 20, 2020 at 6:35 AM guojiufu via Gcc-patches > wrote: > > > > Hi, > > > > When unroll loops, if there are calls inside the loop, those calls > > may raise negative impacts for unrolling. This patch adds a param > > param_max_unrolled_calls, and checks if the number of calls inside >

Re: [PATCH] Check calls before loop unrolling

2020-08-24 Thread Richard Biener via Gcc-patches
On Thu, Aug 20, 2020 at 6:35 AM guojiufu via Gcc-patches wrote: > > Hi, > > When unroll loops, if there are calls inside the loop, those calls > may raise negative impacts for unrolling. This patch adds a param > param_max_unrolled_calls, and checks if the number of calls inside > the loop bigger