Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-24 Thread Richard Biener
On Thu, Jul 24, 2014 at 3:52 AM, Pengfei Yuan 0xcool...@gmail.com wrote: There are more. In toplev.c: /* One region RA really helps to decrease the code size. */ if (flag_ira_region == IRA_REGION_AUTODETECT) flag_ira_region = optimize_size || !optimize ? IRA_REGION_ONE :

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-24 Thread Pengfei Yuan
No, I didn't. 2014-07-24 16:50 GMT+08:00 Richard Biener richard.guent...@gmail.com: On Thu, Jul 24, 2014 at 3:52 AM, Pengfei Yuan 0xcool...@gmail.com wrote: There are more. In toplev.c: /* One region RA really helps to decrease the code size. */ if (flag_ira_region ==

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-23 Thread Richard Biener
On Wed, Jul 23, 2014 at 2:39 AM, Pengfei Yuan 0xcool...@gmail.com wrote: In the experiment, about 60% (1019/1699) profile data files are empty (all counters are zero). Well, but you are globally overriding options even for the parts with profile. The whole point of profile-feedback is to get

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-23 Thread Pengfei Yuan
I guess some optimizations are controlled only by optimize_size, not by the profile. Other optimizations are controlled by the profile. So this patch does not have very much effectiveness (only 0.9% size reduction). 2014-07-23 17:26 GMT+08:00 Richard Biener richard.guent...@gmail.com: On Wed,

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-23 Thread Richard Biener
On Wed, Jul 23, 2014 at 1:04 PM, Pengfei Yuan 0xcool...@gmail.com wrote: I guess some optimizations are controlled only by optimize_size, not by the profile. I only see tree-inline.c:estimate_move_cost which we should indeed fix, it could make a significant difference. One other use in

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-23 Thread Jan Hubicka
On Wed, Jul 23, 2014 at 2:39 AM, Pengfei Yuan 0xcool...@gmail.com wrote: In the experiment, about 60% (1019/1699) profile data files are empty (all counters are zero). Well, but you are globally overriding options even for the parts with profile. The whole point of profile-feedback is to

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-23 Thread Jan Hubicka
I guess some optimizations are controlled only by optimize_size, not by the profile. Other optimizations are controlled by the profile. So this patch does not have very much effectiveness (only 0.9% size reduction). 0.9% size reduction counts as very much in compiler developers perspective

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-23 Thread Pengfei Yuan
There are more. In toplev.c: /* One region RA really helps to decrease the code size. */ if (flag_ira_region == IRA_REGION_AUTODETECT) flag_ira_region = optimize_size || !optimize ? IRA_REGION_ONE : IRA_REGION_MIXED; In config/i386/i386.c: * Assignment of ix86_cost * Decision

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-22 Thread Richard Biener
On Mon, Jul 21, 2014 at 7:13 AM, Pengfei Yuan 0xcool...@gmail.com wrote: Hi, This patch tunes optimization options based on profile data: * Disable PGO options if profile is not available or empty. * Optimize for size if profile is available but empty. Err ... these don't seem interesting

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-22 Thread Pengfei Yuan
In the experiment, about 60% (1019/1699) profile data files are empty (all counters are zero). 2014-07-22 21:39 GMT+08:00 Richard Biener richard.guent...@gmail.com: On Mon, Jul 21, 2014 at 7:13 AM, Pengfei Yuan 0xcool...@gmail.com wrote: Hi, This patch tunes optimization options based on

[PATCH, 4.9/4.10] Profile based option tuning

2014-07-20 Thread Pengfei Yuan
Hi, This patch tunes optimization options based on profile data: * Disable PGO options if profile is not available or empty. * Optimize for size if profile is available but empty. Here is an experiment on Firefox PGO build: CPU Intel Core i7-4770 RAM 32

Re: [PATCH, 4.9/4.10] Profile based option tuning

2014-07-20 Thread Pengfei Yuan
Sorry, tabs seems converted to spaces automatically. Please use the attachment instead. 2014-07-21 13:13 GMT+08:00 Pengfei Yuan 0xcool...@gmail.com: Hi, This patch tunes optimization options based on profile data: * Disable PGO options if profile is not available or empty. * Optimize for