This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Disable -fno-reorder-blocks-and-partition if no -fprofile-use to avoid unnecessary overhead
- From: Teresa Johnson <tejohnson at google dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Bernd Schmidt <bschmidt at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Xinliang David Li <davidxl at google dot com>
- Date: Fri, 25 Sep 2015 09:56:11 -0700
- Subject: Re: [PATCH] Disable -fno-reorder-blocks-and-partition if no -fprofile-use to avoid unnecessary overhead
- Authentication-results: sourceware.org; auth=none
- References: <CAAe5K+WwdWZyp96ODECAxPsu-nf97akiKzremnhPbiYGS2E_bw at mail dot gmail dot com> <56055316 dot 6080901 at redhat dot com> <CAAe5K+WF3=tAvyRoYVQtGTou3kx31+86NxPHqcpp_pXPfT+kfQ at mail dot gmail dot com> <20150925143447 dot GI59241 at kam dot mff dot cuni dot cz>
On Fri, Sep 25, 2015 at 7:34 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> > What has changed between then and now? Also, do we not use
>> > estimates/heuristics when not using a profile?
>>
>> Nothing has changed - splitting effectively never kicked in without a
>> profile. Honza and I had discussed the idea that static profile
>> heuristics could eventually be used to distinguish hot vs cold bbs,
>
> Yep, the basic idea was to move EH clenaups to the cold section for start. The
> cleanup code can get surprisingly large for some C++ apps.
>
>> but that hasn't happened. What I didn't notice until recently was the
>> size increase in the .o files from varasm adding in unnecessary
>> sections and labels when this option was on. Unless and until static
>
> Perhaps we also may just teach varasm to not output those when function is not
> split. I am happy with the patch as it is because it is pointless to run the
> code when no splitting happens.
Right, that will need to happen if splitting is tuned for static
frequencies. For now I committed this patch.
I also fixed the old change log entry that Bernd pointed out.
Thanks,
Teresa
>
> Honza
>> heuristics are used to distinguish cold bbs in
>> probably_never_executed_bb_p, I don't think it makes sense to do
>> anything finer grained that just disabling the option.
>>
>> Teresa
>>
>> >
>> >
>> > Bernd
>>
>>
>>
>> --
>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
--
Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413