This is the mail archive of the
gcc-patches@gcc.gnu.org
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: Teresa Johnson <tejohnson at google dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Dehao Chen <dehao at google dot com>, Xinliang David Li <davidxl at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 11 Nov 2013 18:13:08 +0100
- Subject: Re: [PATCH] decide edge's hotness when there is profile info
- Authentication-results: sourceware.org; auth=none
- References: <CAAe5K+Vw8YbvEe+qSKF8js_TgCEehdJ-qKVD2HkFS0pBRF+e+g at mail dot gmail dot com> <CAAe5K+XHKWOkZEaavJkFEfhWME4qKg_ByuXSrzxhKjgCu-QpWQ at mail dot gmail dot com> <20131018211757 dot GB31793 at kam dot mff dot cuni dot cz> <CAAe5K+XKp_5eBhEXxF29OmdrRv9nyr+aXW+PCdGH4hsFGY0X3w at mail dot gmail dot com> <CAAe5K+WZ2=YavTXf3yzdRHOmO9rEhvUM6xpDUKiRhkGhbX6JBQ at mail dot gmail dot com> <CAAe5K+UOn4wxvwsGhy_EjiFFQMDB-emRbpNJkY5bBf6QgRJo4w at mail dot gmail dot com> <20131111152309 dot GC4119 at atrey dot karlin dot mff dot cuni dot cz> <CAAe5K+UgOsGOA7AfRRPVyj3nb-fYGu4-gFkjWBY1fcu1PWsR-w at mail dot gmail dot com> <20131111162226 dot GD4119 at atrey dot karlin dot mff dot cuni dot cz> <CAAe5K+USHR0AdRAYEVFwGfXJjsvWmvB_GVFT90MR+s7NnN4Y4w at mail dot gmail dot com>
> On Mon, Nov 11, 2013 at 8:22 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> >> I have a warning like that already in drop_profile(). Is that
> >
> > I think it should be warning (or silent) for COMDAT and error/note for
> > other functions (depending on flag_profile_correction).
> > I guess drop_profile is better place for it indeed.
>
> I don't want to warn for COMDAT since this is currently an expected
> issue in that case, so I'm afraid it will be too noisy (but there is a
> note emitted to the dump file to track how often this occurs). So
> currently the warning is only emitted in cases where we don't expect
> it to occur (e.g. non-comdat).
I see, I misread it.
The non-comdat warning IMO ought go the same way as the other profile confussions.
I guess something like
if (!flag_profile_correction)
error (...);
like existing cases in profile.c
>
> I didn't find any warnings being emitted when running this for spec or
> internal benchmarks, so how about instead of a warning, I handle it
> like you suggest above: depending on the setting of
> flag_profile_correction either error or emit a note to the dump file
> under MSG_MISSED_OPTIMIZATION?
Yep, lets just go with error with !flag_profile_correction and being silent
otherwise.
If we want to go with warnings, we need to change all the similar places
in profile.c and elsewhere.
>
> Ah - I just realized I am already checking profile_status_for_function
> above and adding to the worklist if it is still PROFILE_READ. Since I
> call drop_profile before adding to the worklist, we can't end up
> adding multiple times. So I don't think there is currently an issue
> with this.
Yep, indeed.
The patch is OK with the error message as discussed above.
Thanks.
Honza
>
> Thanks,
> Teresa
>
> >
> > Honza
> >>
> >> Thanks,
> >> Teresa
> >>
> >> >
> >> > OK, with these changes.
> >> >
> >> > Honza
> >>
> >>
> >>
> >> --
> >> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
>
>
>
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413