summaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-18 21:51:30 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-18 21:51:30 +0000
commite5562ab8e532eb6104339ce200605eecf03f005e (patch)
treedb89690196904c8e80b96367e5391e21d394dfd5 /gcc/cfgcleanup.c
parenta9d598c12edda016a3fa588c084af64098dfa7c6 (diff)
downloadgcc-e5562ab8e532eb6104339ce200605eecf03f005e.tar.gz
* 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 <geoffk@apple.com> * 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
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c6
1 files changed, 3 insertions, 3 deletions
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;