Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-04 Thread Dehao Chen
Patch updated to set the iteration threshold to 10 for AutoFDO. Performance test shows ok. OK for google-4_8 branch? Thanks, Dehao Index: gcc/ipa-inline.c === --- gcc/ipa-inline.c (revision 199593) +++ gcc/ipa-inline.c (working

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-04 Thread Xinliang David Li
ok. David On Tue, Jun 4, 2013 at 9:51 AM, Dehao Chen de...@google.com wrote: Patch updated to set the iteration threshold to 10 for AutoFDO. Performance test shows ok. OK for google-4_8 branch? Thanks, Dehao Index: gcc/ipa-inline.c

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-03 Thread Dehao Chen
The performance testing is ok. But it does not solve the problem: for some recursive function calls, the size growth is calculated as 0. So I think we may want to just fall back to the 4.7 to limit the iterations to 10 for AutoFDO enabled build? Dehao On Sun, Jun 2, 2013 at 9:36 PM, Xinliang

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-02 Thread Dehao Chen
The patch was committed to google-4_8, but it causes problem because einline sets PARAM_EARLY_INLINING_INSNS = 11. This will cause recursive inlining at einline stage (e.g. main-foo, foo-bar, bar-foo) when autofdo is enabled. The following patch can fix the problem by doing more targetted early

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-02 Thread Xinliang David Li
auto profile info is not available yet in early inlining, why would this change make any difference? Can you just reset the max_iters to a higher value for autoFDO? David On Sun, Jun 2, 2013 at 6:21 PM, Dehao Chen de...@google.com wrote: The patch was committed to google-4_8, but it causes

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-02 Thread Dehao Chen
On Sun, Jun 2, 2013 at 7:14 PM, Xinliang David Li davi...@google.com wrote: auto profile info is not available yet in early inlining, why would this change make any difference? Because the check of PARAM_EARLY_INLINING_INSNS is after the check of cgraph_maybe_hot_edge_p in early inline. If

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-02 Thread Xinliang David Li
If the purpose of the fix is to filter early inlinings with code growth in autoFDO, the proposed fix is the wrong way to do -- it changes the meaning of cgraph_maybe_hot_edge_p. David On Sun, Jun 2, 2013 at 7:25 PM, Dehao Chen de...@google.com wrote: On Sun, Jun 2, 2013 at 7:14 PM, Xinliang

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-02 Thread Dehao Chen
I've updated the patch to check it at ipa-inline: Index: gcc/ipa-inline.c === --- gcc/ipa-inline.c (revision 199593) +++ gcc/ipa-inline.c (working copy) @@ -434,6 +434,16 @@ want_early_inline_function_p (struct cgraph_edge *

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-02 Thread Xinliang David Li
The patch is ok if performance test passes. For a complete fix, Is it better to tune down PARAM_EARLY_INLINE_INSNS from 11 to a small value for autoFDO or use a different parameter? David On Sun, Jun 2, 2013 at 9:19 PM, Dehao Chen de...@google.com wrote: I've updated the patch to check it at

[GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-05-29 Thread Dehao Chen
In gcc4-8, the max einline iterations are restricted to 1. For AutoFDO, this is bad because early inline is not size restricted. This patch allows einline to do multiple iterations in AutoFDO. It also enables tracer optimization in AutoFDO. Bootstrapped and passed regression test. OK for

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-05-29 Thread Xinliang David Li
The early inlining part is ok. The tracer optimization should be revisited -- we should have more fine grain control on it (for instance, based on FDO summary -- but that should be common to FDO/LIPO). David On Wed, May 29, 2013 at 9:39 AM, Dehao Chen de...@google.com wrote: In gcc4-8, the max

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-05-29 Thread Dehao Chen
OK, I'll commit the early inline part. Dehao On Wed, May 29, 2013 at 10:00 AM, Xinliang David Li davi...@google.com wrote: The early inlining part is ok. The tracer optimization should be revisited -- we should have more fine grain control on it (for instance, based on FDO summary -- but that