summaryrefslogtreecommitdiff
path: root/gcc/regrename.c
diff options
context:
space:
mode:
authorlauras <lauras@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-07 02:58:06 +0000
committerlauras <lauras@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-07 02:58:06 +0000
commit40aed475ae428940429b27bb24cddc1763b79b2b (patch)
tree7ccd90b156ce32fb4c8f8191c5876483c41c14e4 /gcc/regrename.c
parent79acaae17e126f58016355519d445e2766a34771 (diff)
downloadgcc-40aed475ae428940429b27bb24cddc1763b79b2b.tar.gz
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@128224 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r--gcc/regrename.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 74112c3ca53..934df394aaa 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1567,9 +1567,9 @@ static bool
copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
{
bool changed = false;
- rtx insn;
+ rtx insn, next;
- for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn))
+ FOR_BB_INSNS_SAFE (bb, insn, next)
{
int n_ops, i, alt, predicated;
bool is_asm, any_replacements;