[commited] profile updating

Jan Hubicka hubicka@ucw.cz
Sat Sep 11 00:27:00 GMT 2004


> Jan Hubicka wrote:
> 
> > I would now kindly request the developers to care updating profile.
> > It is very dificult to audit the code and add updating afterwards.
> > With the new sanity checking you get warnings output to the dumps so
> > it should be easy to notice when something is wrong.
> 
> Is it possible to add some verify_profile stuff which aborts if the profile
> info is incorrect? I think this would be the safest way.

This is, very unfortunately ineed, impossible in general.
Basically in some optimizations you have no other choice but keep
profile inconsistent.  Think of inlining that copies the function along
with it's probabilities, but in the particular contex it got inlined
into some conditionals simplifies to constant but still have the
impossible edge with nonzero probability.

I was thinking of hack where passes can specify profile to be known to
be bogus on given basic block, but I am not sure how well such sheme
would work, as soom about every block might have the flag set.

I was looking into what other compilers do and didn't found any having
any sane way of sanity checking.

Honza
> 
> Giovanni Bajo
> 



More information about the Gcc-patches mailing list