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


> Do you mean adjusting bb->count? Because in
> expand_call_inline(tree-inline.c), it will use bb->count to pass into
> copy_body to calculate count_scale.

What about taking here callee->count instead? For inline nodes without
any capping hack, bb->count == edge->count = callee->count.

When profile ends up being obviously inconsistent, I would say that
inliner can cap callee->count during producing the clone...

Honza
> 
> Thanks,
> Dehao
> 
> On Fri, May 16, 2014 at 5:22 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> >> 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.
> >
> > In this case I still think we should handle this when producing the clone:
> > we do not want to have clone's count much larger as well, so i think inliner
> > and ipa-cp needs to deal with capping here instead....
> >
> > Honza
> >>
> >> Dehao
> >> >
> >> >
> >> > Honza


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