cfglayout.c (fixup_reorder_chain): Postpone deleting dead jump tables...
* cfglayout.c (fixup_reorder_chain): Postpone deleting dead jump tables, move the call to delete_dead_jumptables from here... (cfg_layout_finalize): ...to here. But rebuild jump labels first. * cfgrtl.c (cfg_layout_can_merge_blocks_p): When not optimizing, don't allow merging of blocks that try_redirect_by_replacing_jump also does not handle when not optimizing. From-SVN: r122957
This commit is contained in:
parent
30bcc02890
commit
49ea3702aa
|
@ -1,3 +1,13 @@
|
||||||
|
2007-03-15 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR middle-end/31159
|
||||||
|
* cfglayout.c (fixup_reorder_chain): Postpone deleting dead
|
||||||
|
jump tables, move the call to delete_dead_jumptables from here...
|
||||||
|
(cfg_layout_finalize): ...to here. But rebuild jump labels first.
|
||||||
|
* cfgrtl.c (cfg_layout_can_merge_blocks_p): When not optimizing,
|
||||||
|
don't allow merging of blocks that try_redirect_by_replacing_jump
|
||||||
|
also does not handle when not optimizing.
|
||||||
|
|
||||||
2007-03-15 Uros Bizjak <ubizjak@gmail.com>
|
2007-03-15 Uros Bizjak <ubizjak@gmail.com>
|
||||||
Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
|
|
|
@ -697,7 +697,6 @@ fixup_reorder_chain (void)
|
||||||
#ifdef ENABLE_CHECKING
|
#ifdef ENABLE_CHECKING
|
||||||
verify_insn_chain ();
|
verify_insn_chain ();
|
||||||
#endif
|
#endif
|
||||||
delete_dead_jumptables ();
|
|
||||||
|
|
||||||
/* Now add jumps and labels as needed to match the blocks new
|
/* Now add jumps and labels as needed to match the blocks new
|
||||||
outgoing edges. */
|
outgoing edges. */
|
||||||
|
@ -1193,6 +1192,9 @@ cfg_layout_finalize (void)
|
||||||
fixup_fallthru_exit_predecessor ();
|
fixup_fallthru_exit_predecessor ();
|
||||||
fixup_reorder_chain ();
|
fixup_reorder_chain ();
|
||||||
|
|
||||||
|
rebuild_jump_labels (get_insns ());
|
||||||
|
delete_dead_jumptables ();
|
||||||
|
|
||||||
#ifdef ENABLE_CHECKING
|
#ifdef ENABLE_CHECKING
|
||||||
verify_insn_chain ();
|
verify_insn_chain ();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2519,10 +2519,11 @@ cfg_layout_can_merge_blocks_p (basic_block a, basic_block b)
|
||||||
/* Must be simple edge. */
|
/* Must be simple edge. */
|
||||||
&& !(single_succ_edge (a)->flags & EDGE_COMPLEX)
|
&& !(single_succ_edge (a)->flags & EDGE_COMPLEX)
|
||||||
&& a != ENTRY_BLOCK_PTR && b != EXIT_BLOCK_PTR
|
&& a != ENTRY_BLOCK_PTR && b != EXIT_BLOCK_PTR
|
||||||
/* If the jump insn has side effects,
|
/* If the jump insn has side effects, we can't kill the edge.
|
||||||
we can't kill the edge. */
|
When not optimizing, try_redirect_by_replacing_jump will
|
||||||
|
not allow us to redirect an edge by replacing a table jump. */
|
||||||
&& (!JUMP_P (BB_END (a))
|
&& (!JUMP_P (BB_END (a))
|
||||||
|| (reload_completed
|
|| ((!optimize || reload_completed)
|
||||||
? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a)))));
|
? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue