On 07/11/2017 04:37 AM, Martin Liška wrote:
> Hello.
> 
> Following is a typo fix which nobody has noticed during testing of
> e.g. gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c.
> 
> 
> Patch can bootstrap and survives regression tests.
> 
> Ready for trunk?
> Thanks,
> Martin
> 
> 
> gcc/ChangeLog:
> 
> 2017-07-11  Martin Liska  <mli...@suse.cz>
> 
>     * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
>     Fix wrong condition.
The preceeding comment says

"If it is no less than half of the callsite count (stored in INFO), the
original promoted target is considered not hot anymore."

"it" presumably refers to TOTAL  and INFO->count holds the callsite count.

A direct translation would result in

! (total < info->count / 2)

Which is equivalent to

(total >= info->count / 2)

Which seems to match the code.

So is the comment wrong?  Or is my interpretation wrong?

jeff

Reply via email to