summaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-25 10:53:06 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-25 10:53:06 +0000
commiteea7b156e468e98de691a60ad941e694d063f82a (patch)
treedbf72ba61ed6753fe19c4159331e8b57ecaa7d44 /gcc/cfgcleanup.c
parent0447af6cf0fa465bb5e0c15a3939dad0c1b3f564 (diff)
downloadgcc-eea7b156e468e98de691a60ad941e694d063f82a.tar.gz
* jump.c (mark_all_labels): Work in cfglayout mode.
* cfgcleanup.c (cleanup_cfg): Do not call delete_dead_jumptables when in cfglayout mode, because there are no dead jumptables visible. * cfgrtl.c (commit_one_edge_insertion): Don't set bb->aux when in cfglayout mode. (commit_edge_insertions): Do not allow insertion of instructions with control flow insns when in cfglayout mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119191 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 046ee779fe7..ad9ae4f8f3b 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -763,8 +763,6 @@ merge_blocks_move (edge e, basic_block b, basic_block c, int mode)
if (BB_PARTITION (b) != BB_PARTITION (c))
return NULL;
-
-
/* If B has a fallthru edge to C, no need to move anything. */
if (e->flags & EDGE_FALLTHRU)
{
@@ -2260,7 +2258,15 @@ cleanup_cfg (int mode)
}
else
break;
- delete_dead_jumptables ();
+
+ /* Don't call delete_dead_jumptables in cfglayout mode, because
+ that function assumes that jump tables are in the insns stream.
+ But we also don't _have_ to delete dead jumptables in cfglayout
+ mode because we shouldn't even be looking at things that are
+ not in a basic block. Dead jumptables are cleaned up when
+ going out of cfglayout mode. */
+ if (!(mode & CLEANUP_CFGLAYOUT))
+ delete_dead_jumptables ();
}
timevar_pop (TV_CLEANUP_CFG);