diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2013-11-13 22:55:49 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2013-11-13 22:55:49 +0000 |
commit | d7b6661b5518178c86b947a5996afbd468ee69a6 (patch) | |
tree | c0544da5ab78cc2a30727ef7c2fc441c94407305 /gcc/reorg.c | |
parent | c3d77f3add93300df9893709111089f2a9650e83 (diff) | |
download | gcc-d7b6661b5518178c86b947a5996afbd468ee69a6.zip gcc-d7b6661b5518178c86b947a5996afbd468ee69a6.tar.gz gcc-d7b6661b5518178c86b947a5996afbd468ee69a6.tar.bz2 |
cfgrtl.c (can_fallthru): Reorder code to move tablejump check up.
* cfgrtl.c (can_fallthru): Reorder code to move tablejump check up.
Make that check explicit. BB_HEAD cannot be NULL, remove check for it.
* haifa-sched.c (ready_remove_first_dispatch): Check INSN_P before
looking at INSN_CODE.
* reload1.c (delete_dead_insn) Do not expect JUMP_TABLE_DATA to be an
active_insn_p object, respect basic block boundaries.
* reorg.c (follow_jumps): Use invariant that JUMP_TABLE_DATA always
follows immediately after the jump table data label.
* config/nds32/nds32.c (nds32_output_casesi_pc_relative): Likewise.
* config/sh/sh.c (barrier_align): Likewise. Rearrange code such
that JUMP_TABLE_DATA is not expected to be an active_insn_p object.
From-SVN: r204758
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r-- | gcc/reorg.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c index e9aa889..a87979d 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -2302,15 +2302,16 @@ follow_jumps (rtx label, rtx jump, bool *crossing) depth++) { rtx this_label = JUMP_LABEL (insn); - rtx tem; /* If we have found a cycle, make the insn jump to itself. */ if (this_label == label) return label; + + /* Cannot follow returns and cannot look through tablejumps. */ if (ANY_RETURN_P (this_label)) return this_label; - tem = next_active_insn (this_label); - if (tem && JUMP_TABLE_DATA_P (tem)) + if (NEXT_INSN (this_label) + && JUMP_TABLE_DATA_P (NEXT_INSN (this_label))) break; if (!targetm.can_follow_jump (jump, insn)) |