Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-25 Thread Yuan, Pengfei
Hi, May I ask if there is any decision? Regards, Yuan, Pengfei > > > I also like a new param better as it avoids a new magic constant and > > > makes playing with > > > it easier (your patch removes the ability to do statistics like you did > > > via the > > > early-inlining-insns parameter by

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-21 Thread Yuan, Pengfei
> > Btw, It occurs to me that then win in code-size might be purely due to the > > smaller base value for the TU size we use to compute the maximum unit > > growth with ... any idea how to improve it on this side? Say, computing > > the TU size before early optimization (uh, probably not ...) > >

Re: Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-20 Thread Yuan, Pengfei
> >> > Btw, It occurs to me that then win in code-size might be purely due to > >> > the > >> > smaller base value for the TU size we use to compute the maximum unit > >> > growth with ... any idea how to improve it on this side? Say, computing > >> > the TU size before early optimization (uh, pr

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-20 Thread Richard Biener
On Tue, Sep 20, 2016 at 1:57 PM, Yuan, Pengfei wrote: >> > Btw, It occurs to me that then win in code-size might be purely due to the >> > smaller base value for the TU size we use to compute the maximum unit >> > growth with ... any idea how to improve it on this side? Say, computing >> > the TU

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-20 Thread Yuan, Pengfei
> > Btw, It occurs to me that then win in code-size might be purely due to the > > smaller base value for the TU size we use to compute the maximum unit > > growth with ... any idea how to improve it on this side? Say, computing > > the TU size before early optimization (uh, probably not ...) > >

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-20 Thread Richard Biener
On Tue, Sep 20, 2016 at 1:31 PM, Richard Biener wrote: > On Fri, Sep 16, 2016 at 2:00 PM, Jan Hubicka wrote: >>> > > I also like a new param better as it avoids a new magic constant and >>> > > makes playing with >>> > > it easier (your patch removes the ability to do statistics like you did >>>

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-20 Thread Richard Biener
On Fri, Sep 16, 2016 at 2:00 PM, Jan Hubicka wrote: >> > > I also like a new param better as it avoids a new magic constant and >> > > makes playing with >> > > it easier (your patch removes the ability to do statistics like you did >> > > via the >> > > early-inlining-insns parameter by forcing

Re: Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-20 Thread Yuan, Pengfei
> > > > I also like a new param better as it avoids a new magic constant and > > > > makes playing with > > > > it easier (your patch removes the ability to do statistics like you did > > > > via the > > > > early-inlining-insns parameter by forcing it to two). > > > > > > Hmm, you are right that

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Jan Hubicka
> > > I also like a new param better as it avoids a new magic constant and > > > makes playing with > > > it easier (your patch removes the ability to do statistics like you did > > > via the > > > early-inlining-insns parameter by forcing it to two). > > > > Hmm, you are right that you do not kn

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Yuan, Pengfei
> > I also like a new param better as it avoids a new magic constant and > > makes playing with > > it easier (your patch removes the ability to do statistics like you did via > > the > > early-inlining-insns parameter by forcing it to two). > > Hmm, you are right that you do not know if this par

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Jan Hubicka
> On Fri, Sep 16, 2016 at 10:50 AM, Yuan, Pengfei wrote: > >> > Here are the results: > >> > > >> > Param Size (GCC5)Time (GCC5) Time (GCC7) > >> > 0 44686265 (-8.26%) 58.772s 66.332s > >> > 1 45692793 (-6.19%) 40.684s 39.220s > >> > 2 45556185 (-6.47%) 35.292

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 10:50 AM, Yuan, Pengfei wrote: >> > Here are the results: >> > >> > Param Size (GCC5)Time (GCC5) Time (GCC7) >> > 0 44686265 (-8.26%) 58.772s 66.332s >> > 1 45692793 (-6.19%) 40.684s 39.220s >> > 2 45556185 (-6.47%) 35.292s 34.328s

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Yuan, Pengfei
> > Here are the results: > > > > Param Size (GCC5)Time (GCC5) Time (GCC7) > > 0 44686265 (-8.26%) 58.772s 66.332s > > 1 45692793 (-6.19%) 40.684s 39.220s > > 2 45556185 (-6.47%) 35.292s 34.328s > > 3 46251049 (-5.05%) 28.820s 27.136s > > 4

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Jan Hubicka
> > Here are the results: > > Param Size (GCC5)Time (GCC5) Time (GCC7) > 0 44686265 (-8.26%) 58.772s 66.332s > 1 45692793 (-6.19%) 40.684s 39.220s > 2 45556185 (-6.47%) 35.292s 34.328s > 3 46251049 (-5.05%) 28.820s 27.136s > 4 47028873 (-

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-15 Thread Yuan, Pengfei
> > Setting PARAM_EARLY_INLINING_INSNS to 0 when FDO is enabled should be > > equivalent to my patch. > > Yes. This means it's easy to experiment with other values than zero. > Basically > early inlining is supposed to remove abstraction penalty to > > a) reduce FDO instrumentation overhead >

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-15 Thread Yuan, Pengfei
> Yes. This means it's easy to experiment with other values than zero. > Basically > early inlining is supposed to remove abstraction penalty to > > a) reduce FDO instrumentation overhead > b) get more realistic size estimates for the inliner > > a) was particularly important back in time fo

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-15 Thread Richard Biener
On Thu, Sep 15, 2016 at 2:21 AM, Yuan, Pengfei wrote: >> I think the approach is reasonable though it might still have >> interesting effects on >> optimization for very small growth. So for further experimenting it >> would be nice > > Test it on SPEC CPU with FDO enabled? > >> to have a separat

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-14 Thread Yuan, Pengfei
> I think the approach is reasonable though it might still have > interesting effects on > optimization for very small growth. So for further experimenting it > would be nice Test it on SPEC CPU with FDO enabled? > to have a separate PARAM_EARLY_FDO_INLINING_INSNS or maybe simply > adjust the PA

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-14 Thread Richard Biener
On Sat, Sep 10, 2016 at 8:04 AM, Yuan, Pengfei wrote: > Hi, > > Previously I have sent a patch on profile based option tuning: > https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01377.html > > According to Richard Biener's advice, I try investigating where the code size > reduction comes from. After