aboutsummaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1998-01-13 13:38:31 -0800
committerJeff Law <law@gcc.gnu.org>1998-01-13 14:38:31 -0700
commitc995fea1951e649c43de8a41275ce7afbe6af7bc (patch)
treec3662172ac679ef69dbbc319606a2adbf6a31303 /gcc/haifa-sched.c
parent88ea0ad1b24059496d29c55a19b02295dfb85d3a (diff)
downloadgcc-c995fea1951e649c43de8a41275ce7afbe6af7bc.zip
gcc-c995fea1951e649c43de8a41275ce7afbe6af7bc.tar.gz
gcc-c995fea1951e649c43de8a41275ce7afbe6af7bc.tar.bz2
haifa-sched.c (schedule_insns): Correctly remove inter-block dependencies after reload.
* haifa-sched.c (schedule_insns): Correctly remove inter-block dependencies after reload. From-SVN: r17346
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 02350e1..ec66e77 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -8533,16 +8533,23 @@ schedule_insns (dump_file)
for (b = 0; b < n_basic_blocks; b++)
for (insn = basic_block_head[b];; insn = NEXT_INSN (insn))
{
- rtx link;
+ rtx link, prev;
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
{
- for (link = LOG_LINKS (insn); link; link = XEXP (link, 1))
+ prev = NULL_RTX;
+ link = LOG_LINKS (insn);
+ while (link)
{
rtx x = XEXP (link, 0);
if (INSN_BLOCK (x) != b)
- remove_dependence (insn, x);
+ {
+ remove_dependence (insn, x);
+ link = prev ? XEXP (prev, 1) : LOG_LINKS (insn);
+ }
+ else
+ prev = link, link = XEXP (prev, 1);
}
}