Hello,
This main patch uses set_immediate_dominator and iterate_fix_dominators
when updating control flow in selective scheduler. The difficulty I had is
that when an unreachable block may be created, you need to defer the update
until the block is removed, so sometimes we avoid updating dominance info
in sel_redirect_edge_and_branch and postpone it to maybe_tidy_empty_bb
instead. I will add testcase from PR 43603, and I need to minimize one from
PR 44233.
Bootstrapped with the other two patches, testing is in progress. Ok for
trunk if it succeeds? Ok for 4.5/4.4 after a week or two?
Andrey
2010-10-04 Andrey Belevantsev <abel@ispras.ru>
PR target/43603
PR target/44233
* haifa-sched.c (sched_create_recovery_edges): Update
dominator info.
* sel-sched-ir.c (maybe_tidy_empty_bb): Update dominator info
after deleting an empty block.
(sel_remove_bb): Update dominator info after removing a block.
(sel_redirect_edge_and_branch_force): Assert that no unreachable
blocks will be created. Update dominator info.
(sel_redirect_edge_and_branch): Update dominator info when
basic blocks do not become unreachable.
(sel_remove_loop_preheader): Update dominator info.