This is the mail archive of the
mailing list for the GCC project.
Re: HAIFA scheduler bug?
- To: Gary Thomas <g dot thomas at opengroup dot org>
- Subject: Re: HAIFA scheduler bug?
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Wed, 25 Mar 1998 15:38:04 -0800
- cc: egcs-bugs at cygnus dot com, law at cygnus dot com
The problem here is that jump.c is using the REG_DEAD notes to decide what
instructions can be deleted when it makes a change, but REG_DEAD notes are not
valid after reload. This causes jump to mistakenly delete some instructions
that are still needed.
This invalid REG_DEAD note came from a scheduling change that haifa-sched made.
It reversed the order of two instructions, both using the same pseudo, where
the second one had a REG_DEAD note. When jump deleted the first insn with
the REG_DEAD note, it thought it could also delete the insn storing into the
pseudo, but this is not correct.
I think the problem has always been there, and that we were just lucky that
we haven't run into it more often.
The example doesn't fail with the current sources because we get slightly
different RTL (due I think to reload changes), and the code in jump.c in
delete_computation has a == rtl test which fails in this case. The bug is
still there though.
Perhaps we should just add a new pass before the second jump pass to recompute
the REG_DEAD notes?