>
> graphite does
>
> if (changed)
> {
> cleanup_tree_cfg ();
> profile_status_for_fn (cfun) = PROFILE_ABSENT;
> release_recorded_exits (cfun);
> tree_estimate_probability (false);
>
> so it runs into CFG cleanup running before it properly resets counts.
>
> I wonder if we shouldn't simply get rid of the explicit checking calls in
> cfg cleanup... or if the profile checking should happen somewhere
> else.
>
> I'd also appreciate a better way for doing the above. Shouldn't we
> end up with a proper initialization on all edges as we just split
> existing ones and use create_empty_if_region_on_edge and
> create_empty_loop_on_edge?
>
> Ah, those use make_edge as well.
>
> The tree_estimate_probablility call above should be ideally
> replaced with sth like "propagate-SESE-entry-probability".
Well, re-running tree_estimate_probability is a hack and it won't
really get you very sane profile update. I gues create_empty_if_region_on_edge
and create_empty_loop_on_edge should care about profile, i will try to take
a look.
We have frequency propagation across SEME regions as part of
find_sub_basic_blocks.
It does not handle loops sanely though (which could be added), but still someone
needs to care about correct probabilities at least.
Honza
>
> Richard.
>
> > Jakub