From e5562ab8e532eb6104339ce200605eecf03f005e Mon Sep 17 00:00:00 2001 From: hubicka Date: Sun, 18 Jan 2004 21:51:30 +0000 Subject: * basic-block.h (try_redirect_by_replacing_jump): Declare. * cfgcleanup.c (try_optimize_cfg): Use it. * cfgrtl.c (try_redirect_by_replacing_jump): Export. (rtl_redirect_edge_and_branch, cfg_layout_redirect_edge_and_branch): Kill hack. (cfg_layout_merge_blocks): Use try_redirect_by_replacing_jump. Revert: 2004-01-16 Geoffrey Keating * cfgrtl.c (try_redirect_by_replacing_jump): Optimize tablejumps even after reload, just don't remove the actual jump tables. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76115 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cfgcleanup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/cfgcleanup.c') diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 3da1ea5ae59..fe3a3b34493 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1785,13 +1785,13 @@ try_optimize_cfg (int mode) /* If B has a single outgoing edge, but uses a non-trivial jump instruction without side-effects, we can either delete the jump entirely, or replace it - with a simple unconditional jump. Use - redirect_edge_and_branch to do the dirty work. */ + with a simple unconditional jump. */ if (b->succ && ! b->succ->succ_next && b->succ->dest != EXIT_BLOCK_PTR && onlyjump_p (BB_END (b)) - && redirect_edge_and_branch (b->succ, b->succ->dest)) + && try_redirect_by_replacing_jump (b->succ, b->succ->dest, + (mode & CLEANUP_CFGLAYOUT))) { update_forwarder_flag (b); changed_here = true; -- cgit v1.2.1