[PR42245] Recompute top order after redirecting an edge
Vladimir Makarov
vmakarov@redhat.com
Wed Jan 13 20:17:00 GMT 2010
Alexander Monakov wrote:
> This is an updated patch for the same problem, fixing a shortcoming in a
> previously sent implementation.
>
> We 'forgot' to recompute topological order if it was invalidated in
> tidy_control_flow but not in maybe_tidy_empty_bb called from that
> function. Fixed by passing recompute_toporder_p to the latter. We
> have also made maybe_tidy_empty_bb static by moving the only external
> caller into the same file).
>
> Incremental patch is archived at
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42245#c7
>
> Thanks.
>
> 2010-01-13 Andrey Belevantsev <abel@ispras.ru>
> Alexander Monakov <amonakov@ispras.ru>
>
> PR middle-end/42245
> * sel-sched-ir.c (sel_recompute_toporder): New. Use it...
> (maybe_tidy_empty_bb): ... here. Make static. Add new
> argument. Update all callers.
> (tidy_control_flow): ... and here. Recompute topological order
> of basic blocks in region if necessary.
> (sel_redirect_edge_and_branch): Change return type. Return true
> if topological order might have been invalidated.
> (purge_empty_blocks): Export and move from...
> * sel-sched.c (purge_empty_blocks): ... here.
> * sel-sched-ir.h (sel_redirect_edge_and_branch): Update prototype.
> (maybe_tidy_empty_bb): Delete prototype.
> (purge_empty_blocks): Declare.
>
> * gcc.dg/pr42245.c: New.
> * gcc.dg/pr42245-2.c: New.
The patch is ok for the trunk. Thanks.
More information about the Gcc-patches
mailing list