aboutsummaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2006-11-25 10:53:06 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2006-11-25 10:53:06 +0000
commit05549c9604478e34987a41237d67261c42081c0a (patch)
treedbf72ba61ed6753fe19c4159331e8b57ecaa7d44 /gcc/jump.c
parentdc4871cba20dcaade3c609117f4b5ee4e08aeb6b (diff)
downloadgcc-05549c9604478e34987a41237d67261c42081c0a.zip
gcc-05549c9604478e34987a41237d67261c42081c0a.tar.gz
gcc-05549c9604478e34987a41237d67261c42081c0a.tar.bz2
jump.c (mark_all_labels): Work in cfglayout mode.
* 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. From-SVN: r119191
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index f42ee5a..127e8a8 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -202,6 +202,31 @@ mark_all_labels (rtx f)
}
}
}
+
+ /* If we are in cfglayout mode, there may be non-insns between the
+ basic blocks. If those non-insns represent tablejump data, they
+ contain label references that we must record. */
+ if (current_ir_type () == IR_RTL_CFGLAYOUT)
+ {
+ basic_block bb;
+ rtx insn;
+ FOR_EACH_BB (bb)
+ {
+ for (insn = bb->il.rtl->header; insn; insn = NEXT_INSN (insn))
+ if (INSN_P (insn))
+ {
+ gcc_assert (JUMP_TABLE_DATA_P (insn));
+ mark_jump_label (PATTERN (insn), insn, 0);
+ }
+
+ for (insn = bb->il.rtl->footer; insn; insn = NEXT_INSN (insn))
+ if (INSN_P (insn))
+ {
+ gcc_assert (JUMP_TABLE_DATA_P (insn));
+ mark_jump_label (PATTERN (insn), insn, 0);
+ }
+ }
+ }
}
/* Move all block-beg, block-end and loop-beg notes between START and END out