This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] decide edge's hotness when there is profile info
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Dehao Chen <dehao at google dot com>
- Cc: Teresa Johnson <tejohnson at google dot com>, Jan Hubicka <hubicka at ucw dot cz>, Xinliang David Li <davidxl at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 15 Oct 2013 23:03:24 +0200
- Subject: Re: [PATCH] decide edge's hotness when there is profile info
- Authentication-results: sourceware.org; auth=none
- References: <20131014194908 dot GA16717 at kam dot mff dot cuni dot cz> <CAO2gOZU8rdLYJm240xz1T=s_+uOx=DV4nM8YEzBHMY9rC5dw4A at mail dot gmail dot com> <CAAkRFZJWSXd6wkVXwsvPf_zkjY=5DF0YhRL6LCnkPn1qttebUw at mail dot gmail dot com> <CAO2gOZVPv8G5yy6K+itKN=Ra6JCUkpZd2HGGfb34ZKkP75pmuA at mail dot gmail dot com> <20131014215027 dot GD17422 at kam dot mff dot cuni dot cz> <CAO2gOZXeGP8nZsa0aoji1dVxkRjT69G_ySU3iWbK9oJrjF2n_g at mail dot gmail dot com> <CAAe5K+VJ70+Sj_J-uwcr+W6THPZXe5cy-hwtBCpJXms2=nPimg at mail dot gmail dot com> <CAO2gOZVmMLBEnEYdh4yFD8D5y0netp8V0VLNW1Wcwt9fcwEYkw at mail dot gmail dot com> <CAAe5K+V5k2i9gpo0Ak8b5MnC87uSeaJWJzkRUrZxtoF1M8crNg at mail dot gmail dot com> <CAO2gOZV-opRL_R-1sVQD8BdMaUDHac3H+WfF8Y-vkdHzRd__Sg at mail dot gmail dot com>
> Yes, that would work. So let's discard this patch because the fix for
> comdat can also fix this problem.
Unforutnately ipa-profile-estimate is an IPA pass and as such it does
not have access to profile_status_to_function.
You can probably just factor this out into a function that can be called
and for normal FDO we call it where the loop stis now and for auto-FDO we can
probably have another invocation from before early passes where auto-FDO is collected.
> >>> + if (node->count)
> >>> + continue;
Also here we should sum the counts and consider function non unlikely executed
in the same way as probably_never_executed does.
I can prepare updated patch, but i am currently travelling, so i would not
be disapointed if you beat me ;)