GCC testing failed with your patch.
Richard Henderson
rth@cygnus.com
Sat Apr 8 16:11:00 GMT 2000
On Fri, Apr 07, 2000 at 08:06:03PM -0700, GCC regression checker wrote:
> The new failures are:
> gcc.sum gcc.c-torture/compile/920428-5.c,
Whee. The problem was due to my recent flow changes creating
extra death notes for
(insn 19 17 21 (set (zero_extract:SI (reg:SI 86)
(const_int 1 [0x1])
(const_int 0 [0x0]))
(lshiftrt:SI (reg:SI 84)
(const_int 31 [0x1f]))) 215 {*insvsi_internal3}
(expr_list:REG_DEAD (reg:SI 84)
(nil)))
We used to do the right thing only by accident, afaikt. To wit:
we used to collect `live' and `dead' bitmaps for each insn and
apply them both at the end of processing that insn. Thus under
that scenario reg 86 would be seen as !some_was_dead, which meant
that we would not try to apply a death note.
With the restructuring, I now collect `dead' and apply it, then
collect `live' and apply it. This change is primarily due to code
that's still on condexec-branch that tracks conditional deaths,
and the fact that I need `reg_live' to accurately reflect what
exists in `reg_cond_live' when it comes time to update the later
in mark_used_reg.
The patch brings things back to operational order, but I'm unconvinced
that the code is Correct. Seems to me that we shouldn't have killed
reg 86 in the first place, despite the commentary circa line 3987.
Added it to local_set, yes, but that's different.
Oh well, this is the smaller change.
r~
* flow.c (mark_used_reg): Use reg_set_p to determine if a register
was modified in the current insn.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.248
diff -c -p -d -r1.248 flow.c
*** flow.c 2000/04/07 23:33:47 1.248
--- flow.c 2000/04/08 22:37:00
*************** mark_used_reg (pbi, new_live, reg, cond,
*** 4520,4530 ****
/* Record and count the insns in which a reg dies. If it is used in
this insn and was dead below the insn then it dies in this insn.
If it was set in this insn, we do not make a REG_DEAD note;
! likewise if we already made such a note. */
if ((pbi->flags & PROP_DEATH_NOTES)
&& some_was_dead
&& ! dead_or_set_p (insn, reg))
{
int n;
--- 4520,4536 ----
/* Record and count the insns in which a reg dies. If it is used in
this insn and was dead below the insn then it dies in this insn.
+
If it was set in this insn, we do not make a REG_DEAD note;
! likewise if we already made such a note. Recall that dead_or_set_p
! checks for complete overlap, and thus is not suitable for the first
! case. But it does handle the existing note case. Also recall that
! reg_set_p, when presented with the complete insn, will try to infer
! things about a call_insn that we do not wish. */
if ((pbi->flags & PROP_DEATH_NOTES)
&& some_was_dead
+ && ! reg_set_p (reg, PATTERN (insn))
&& ! dead_or_set_p (insn, reg))
{
int n;
More information about the Gcc-patches
mailing list