summaryrefslogtreecommitdiff
path: root/gcc/lower-subreg.c
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-09 02:23:47 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-09 02:23:47 +0000
commit201f6961d11a53a81c70ba41502dbc4928ceb307 (patch)
tree05259961c43e188d2fdeb4b4bfd249aae3d5da63 /gcc/lower-subreg.c
parentd560552f9dfe48f3337cbedd700bca0af2e4af83 (diff)
downloadgcc-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/lower-subreg.c')
-rw-r--r--gcc/lower-subreg.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index e5e76b0b719..b8e2eb65842 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -586,7 +586,7 @@ move_libcall_note (rtx old_start, rtx new_start)
static void
remove_retval_note (rtx insn1)
{
- rtx note0, insn0, note1, insn, next;
+ rtx note0, insn0, note1, insn;
note1 = find_reg_note (insn1, REG_RETVAL, NULL);
if (note1 == NULL_RTX)
@@ -598,9 +598,8 @@ remove_retval_note (rtx insn1)
remove_note (insn0, note0);
remove_note (insn1, note1);
- for (insn = insn0; (insn != insn1) && insn; insn = next)
+ for (insn = insn0; insn != insn1; insn = NEXT_INSN (insn))
{
- next = NEXT_INSN (insn);
while (1)
{
rtx note;
@@ -1255,9 +1254,9 @@ decompose_multiword_subregs (void)
FOR_EACH_BB (bb)
{
- rtx insn, next;
+ rtx insn;
- FOR_BB_INSNS_SAFE (bb, insn, next)
+ FOR_BB_INSNS (bb, insn)
{
rtx next, pat;