This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Ensure count_scale is no larger than REG_BR_PROB_BASE


On Fri, May 16, 2014 at 4:41 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>
> > Is this patch ok for trunk? Bootstrapped and regression test on-going.
> >
> > Thanks,
> > Dehao
> >
> > 2014-05-16  Dehao Chen  <dehao@google.com>
> >
> >         * tree-inline.c (initialize_cfun): Ensure count_scale is no larger
> >         than REG_BR_PROB_BASE.
> >         (copy_cfg_body): Likewise.
>
> This seems like wrong place to paper around the problem - symmetric count
> scaling is done during production of the inline clone.  I think if we want to
> be smart about broken profiles, we should do it at that place instead here
> at inliner...
>
> What kind of problem does this patch solve?


In AutoFDO, a basic block's count can be much larger than it's actual
count because debug info might be incorrect. In this case, a call edge
count (calculated from BB count) could be much larger than callee's
header count, making the count_scale incorrectly large.

Dehao
>
>
> Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]