Re: [GOOGLE] tune loop scale factor for AutoFDO

2013-11-08 Thread Dehao Chen
As discussed offline, will commit this patch first, and think of other smoothing algorithm to prevent profile insanity. Dehao On Fri, Nov 8, 2013 at 9:32 AM, Xinliang David Li wrote: > On Fri, Nov 8, 2013 at 6:23 AM, Dehao Chen wrote: >> AutoFDO sometimes has 0 profile in the loop's entry block

Re: [GOOGLE] tune loop scale factor for AutoFDO

2013-11-08 Thread Xinliang David Li
On Fri, Nov 8, 2013 at 6:23 AM, Dehao Chen wrote: > AutoFDO sometimes has 0 profile in the loop's entry block because the > debug info are lost and unrecoverable. Is that a separate problem to track and fix? Also is it better to do a round of loop profiling smoothing after auto profile annotati

[GOOGLE] tune loop scale factor for AutoFDO

2013-11-08 Thread Dehao Chen
AutoFDO sometimes has 0 profile in the loop's entry block because the debug info are lost and unrecoverable. E.g. if (a) if (b) for () {} This patch checks if the scale factor is 0, then use the normal scale. Bootstrapped and passed regression test and performance test. OK for google-4_8