diff options
author | Jan Hubicka <jh@suse.cz> | 2004-01-18 22:51:30 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2004-01-18 21:51:30 +0000 |
commit | 3348b696a815eb5ddbde242b582ad43aeef6caad (patch) | |
tree | db89690196904c8e80b96367e5391e21d394dfd5 /gcc/cfgcleanup.c | |
parent | 72d89d359c5ead605318589e7ee6c30be782adce (diff) | |
download | gcc-3348b696a815eb5ddbde242b582ad43aeef6caad.tar.gz |
basic-block.h (try_redirect_by_replacing_jump): Declare.
* 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.
From-SVN: r76115
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 6 |
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; |