aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@pierdol.cobaltmicro.com>1998-09-13 05:44:40 +0000
committerDavid S. Miller <davem@gcc.gnu.org>1998-09-12 22:44:40 -0700
commit9655bf953a9f230518f1f1ac9303b8056b4babe8 (patch)
treede4b1e5eb4f023ce5c6c0dd0094681a3a4513bd3 /gcc
parent50a029fdcc3bfd5e17e1435fa5eabec3caa788ab (diff)
downloadgcc-9655bf953a9f230518f1f1ac9303b8056b4babe8.zip
gcc-9655bf953a9f230518f1f1ac9303b8056b4babe8.tar.gz
gcc-9655bf953a9f230518f1f1ac9303b8056b4babe8.tar.bz2
loop.c (move_movables): While removing insn sequences...
* loop.c (move_movables): While removing insn sequences, preserve the next pointer of the most recently deleted insn when we skip over a NOTE. From-SVN: r22402
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/loop.c23
2 files changed, 26 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 47464c3..fb5fe23 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Sun Sep 13 04:37:28 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
+
+ * loop.c (move_movables): While removing insn sequences, preserve
+ the next pointer of the most recently deleted insn when we skip
+ over a NOTE.
+
Sat Sep 12 11:37:19 1998 Michael Meissner <meissner@cygnus.com>
* rs6000.h ({ASM,CPP}_CPU_SPEC): Add support for all machines
diff --git a/gcc/loop.c b/gcc/loop.c
index eae3d74..3efb200 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -1916,9 +1916,17 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
temp = delete_insn (temp);
}
+ temp = p;
p = delete_insn (p);
+
+ /* simplify_giv_expr expects that it can walk the insns
+ at m->insn forwards and see this old sequence we are
+ tossing here. delete_insn does preserve the next
+ pointers, but when we skip over a NOTE we must fix
+ it up. Otherwise that code walks into the non-deleted
+ insn stream. */
while (p && GET_CODE (p) == NOTE)
- p = NEXT_INSN (p);
+ p = NEXT_INSN (temp) = NEXT_INSN (p);
}
start_sequence ();
@@ -2125,9 +2133,18 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
XEXP (temp, 0) = i1;
}
+ temp = p;
delete_insn (p);
- do p = NEXT_INSN (p);
- while (p && GET_CODE (p) == NOTE);
+ p = NEXT_INSN (p);
+
+ /* simplify_giv_expr expects that it can walk the insns
+ at m->insn forwards and see this old sequence we are
+ tossing here. delete_insn does preserve the next
+ pointers, but when we skip over a NOTE we must fix
+ it up. Otherwise that code walks into the non-deleted
+ insn stream. */
+ while (p && GET_CODE (p) == NOTE)
+ p = NEXT_INSN (temp) = NEXT_INSN (p);
}
/* The more regs we move, the less we like moving them. */