This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix profile updating in cfgbuild
> > {
> >- bb->count += e->count;
> >+ if (e->count.initialized_p ())
> >+ {
> >+ bb->count += e->count;
> >+ initialized_src = true;
> >+ }
> >+ else
> >+ uninitialized_src = false;
>
> false?
> Please explain false respectively the initializer (false too) in the light of the condition in the hunk below?
This is a thinko. It was meant to be true. I am testing the fix.
Thanks!
Honza
>
> thanks,
>
> > bb->frequency += EDGE_FREQUENCY (e);
> > }
> >+ /* When some edges are missing with read profile, this is
> >+ most likely because RTL expansion introduced loop.
> >+ When profile is guessed we may have BB that is reachable
> >+ from unlikely path as well as from normal path.
> >+
> >+ TODO: We should handle loops created during BB expansion
> >+ correctly here. For now we assume all those loop to cycle
> >+ precisely once. */
> >+ if (!initialized_src
> >+ || (uninitialized_src
> >+ && profile_status_for_fn (cfun) != PROFILE_READ))
> >+ bb->count = profile_count::uninitialized ();
> > }
> >+ else
> >+ /* If nothing changed, there is no need to create new BBs. */
> >+ if (EDGE_COUNT (bb->succs) == n_succs[bb->index])
> >+ continue;
> >
> > compute_outgoing_frequencies (bb);
> > }