Re: [GOOGLE] Fix AutoFDO size issue

2014-11-17 Thread Dehao Chen
There are actually two patches needed to port to mainline. I'll send out the patch tomorrow. Dehao On Mon, Nov 17, 2014 at 4:58 PM, Andi Kleen wrote: > Xinliang David Li writes: > >> Ok for now as a workraround, but this is probably not a long term fix. > > Is the workaround needed for the main

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-17 Thread Andi Kleen
Xinliang David Li writes: > Ok for now as a workraround, but this is probably not a long term fix. Is the workaround needed for the mainline autofdo version too? -Andi > > David > > > On Mon, Nov 17, 2014 at 12:47 PM, Dehao Chen wrote: >> The patch was updated to ignore comdat einline tuning f

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-17 Thread Xinliang David Li
Ok for now as a workraround, but this is probably not a long term fix. David On Mon, Nov 17, 2014 at 12:47 PM, Dehao Chen wrote: > The patch was updated to ignore comdat einline tuning for AutoFDO. > Performance testing is green. > > OK for google-4_9? > > Thanks, > Dehao > > Index: gcc/auto-pr

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-17 Thread Dehao Chen
The patch was updated to ignore comdat einline tuning for AutoFDO. Performance testing is green. OK for google-4_9? Thanks, Dehao Index: gcc/auto-profile.c === --- gcc/auto-profile.c (revision 217523) +++ gcc/auto-profile.c (working

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-13 Thread Dehao Chen
We do not do sophisticated recursive call detection in einline phase. It only happens in ipa-inline phase. Dehao On Thu, Nov 13, 2014 at 3:18 PM, Xinliang David Li wrote: > On Thu, Nov 13, 2014 at 2:57 PM, Dehao Chen wrote: >> IIRC, AutoFDO the actual iteration for AutoFDO is mostly <3. But it

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-13 Thread Xinliang David Li
On Thu, Nov 13, 2014 at 2:57 PM, Dehao Chen wrote: > IIRC, AutoFDO the actual iteration for AutoFDO is mostly <3. But it > should not harm to set max iter as 10. > > On Thu, Nov 13, 2014 at 2:51 PM, Xinliang David Li wrote: >> After inline summary is recomputed, the large code growth problem will

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-13 Thread Dehao Chen
IIRC, AutoFDO the actual iteration for AutoFDO is mostly <3. But it should not harm to set max iter as 10. On Thu, Nov 13, 2014 at 2:51 PM, Xinliang David Li wrote: > After inline summary is recomputed, the large code growth problem will > also be better controlled, right? For this case, recompu

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-13 Thread Xinliang David Li
After inline summary is recomputed, the large code growth problem will also be better controlled, right? David On Thu, Nov 13, 2014 at 2:48 PM, Xinliang David Li wrote: > Is there a need to have 10 iterations of early inline for autofdo? > > David > > On Thu, Nov 13, 2014 at 2:25 PM, Dehao Chen

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-13 Thread Xinliang David Li
Is there a need to have 10 iterations of early inline for autofdo? David On Thu, Nov 13, 2014 at 2:25 PM, Dehao Chen wrote: > In AutoFDO, we increase einline iterations. This could lead to > extensive code bloat if we have recursive calls like: > > dtor() { > destroy(node); > } > > destroy(nod

[GOOGLE] Fix AutoFDO size issue

2014-11-13 Thread Dehao Chen
In AutoFDO, we increase einline iterations. This could lead to extensive code bloat if we have recursive calls like: dtor() { destroy(node); } destroy(node) { destroy(left) destroy(right) } In this case, the size growth will be around 8 which is smaller than threshold (11). However, if we