[CVS 980326]: Bug in haifa scheduler on sparc-sun-solaris2.5.1
Manfred Hollstein
manfred@s-direktnet.de
Fri Mar 27 13:49:00 GMT 1998
I just observed the following behaviour:
- configure'd egcs with --enable-haifa=yes
- bootstrapped using '-O9 -funroll-all-loops'
During `make check' cc1 runs into a tight loop while compiling
loop-2c.c and loop-2d.c with `-O2 -fomit-frame-pointer
-finline-functions' and either of `-funroll-loops' and
`-funroll-all-loops'.
The loop happens in in haifa-sched.c between lines 1786 - 1812. This
code looks like:
while (tail >= 0)
{
if (head < 0)
head = tail;
child = queue[head];
if (degree[child] == 0)
{
degree[child] = -1;
rgn_bb_table[idx++] = child;
BLOCK_TO_BB (child) = ++count;
CONTAINING_RGN (child) = nr_regions;
queue[head] = queue[tail--];
fst_edge = current_edge = OUT_EDGES (child);
if (fst_edge > 0)
{
do
{
--degree[TO_BLOCK (current_edge)];
current_edge = NEXT_OUT (current_edge);
}
while (fst_edge != current_edge);
}
}
else
--head;
}
Attaching to the running cc1 showed, it's looping without ever
decrementing (not even touching) `tail's value. Apparently, all
`degree[child]' are unequal 0, which simply causes decrementing `head'
and once it's < 0, re-initializing it to the yet unchanged `tail'.
Interestingly, this doesn't happen on hppa1.1-hp-hpux10.20!
Has anybody else observed similar? Any fixes available?
Thanks
manfred
More information about the Gcc-bugs
mailing list