diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-09 02:23:47 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-09 02:23:47 +0000 |
commit | 201f6961d11a53a81c70ba41502dbc4928ceb307 (patch) | |
tree | 05259961c43e188d2fdeb4b4bfd249aae3d5da63 /gcc/cfgrtl.c | |
parent | d560552f9dfe48f3337cbedd700bca0af2e4af83 (diff) | |
download | gcc-201f6961d11a53a81c70ba41502dbc4928ceb307.tar.gz |
Revert:
2007-09-05 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* regrename.c (copyprop_hardreg_forward_1): New variable next. Use
FOR_BB_INSNS_SAFE instead of for loop.
* cse.c (cse_extended_basic_block): Likewise.
* postreload.c (reload_cse_regs_1): New variable next. Make sure
that the for loop does not invoke NEXT_INSN on a deleted insn.
* function.c (instantiate_virtual_regs): Likewise.
* lower-subreg.c (remove_retval_note): Likewise.
(decompose_multiword_subregs): Use FOR_BB_INSNS_SAFE instead of
FOR_BB_INSNS.
* emit-rtl.c (remove_insn): Set NEXT_INSN and PREV_INSN to NULL on
a deleted insn.
* cfgrtl.c (delete_insn): Set JUMP_LABEL to NULL on a deleted
insn, if it's a jump.
(try_redirect_by_replacing_jump): New variable jump_p. Call
tablejump_p before delete_insn_chain.
* reload1.c (reload): New variable next. Make sure that the for
loop does not invoke NEXT_INSN on a deleted insn.
(fixup_eh_region_note): Make the loop terminate if i becomes NULL.
(delete_output_reload): New variable prev. Make sure the the for
loops do not invoke PREV_INSN on a deleted insn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128284 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 9de8d127aef..33ba86cff14 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -141,10 +141,7 @@ delete_insn (rtx insn) if (JUMP_P (insn) && JUMP_LABEL (insn) && LABEL_P (JUMP_LABEL (insn))) - { - LABEL_NUSES (JUMP_LABEL (insn))--; - JUMP_LABEL (insn) = NULL; - } + LABEL_NUSES (JUMP_LABEL (insn))--; /* Also if deleting an insn that references a label. */ else @@ -793,7 +790,6 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) { rtx target_label = block_label (target); rtx barrier, label, table; - bool jump_p; emit_jump_insn_after_noloc (gen_jump (target_label), insn); JUMP_LABEL (BB_END (src)) = target_label; @@ -803,14 +799,13 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) INSN_UID (insn), INSN_UID (BB_END (src))); + delete_insn_chain (kill_from, insn, false); + /* Recognize a tablejump that we are converting to a simple jump and remove its associated CODE_LABEL and ADDR_VEC or ADDR_DIFF_VEC. */ - jump_p = tablejump_p (insn, &label, &table); - - delete_insn_chain (kill_from, insn, false); - if (jump_p) - delete_insn_chain (label, table, false); + if (tablejump_p (insn, &label, &table)) + delete_insn_chain (label, table, false); barrier = next_nonnote_insn (BB_END (src)); if (!barrier || !BARRIER_P (barrier)) |