Prevent combine_instructions() from following non-existant LOG_LINKS
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Tue Apr 25 01:58:00 GMT 2000
At 01:22 25.04.00, Jeffrey A Law wrote:
> In message <200001261857.KAA27932@elmo.cygnus.com>you write:
> > Hi Guys,
> >
> > I ran into a problem with combine_instructions() when RTL checking
> > is enabled. Sometimes it can try to combine an insn which has been
> > deleted and the RTL checking code compainins about an attempt to
> > access the LOG_LINKS of a NOTE which is not supposed to have such a
> > field. (It does have one, because it once was an insn, but the RTL
> > checking code does not know this). The patch below fixes this small
> > problem by tetsing to see if the insn is a NOTE before LOG_LINKS is
> > called.
> >
> > OK to apply this patch ?
> >
> > Cheers
> > Nick
> >
> > 2000-01-25 Nick Clifton <nickc@redhat.com>
> >
> > * combine.c (combine_instructions): Do not try to combine a
> > sequence of insns when the second insn has been replaced by a
> > note.
>This is fine. Go ahead and install it.
>
>Note that at some point we may be able to undo this change if we twiddle
>the auto-inc code in the right manner. But until then I don't see a reason
>why we should continue triggering an enable-checking failure.
Nick, you forgot to update your patch before applying it, this breaks
bootstrap. The appended copy&pasted patch fixes it. I can't apply from work
though.
Franz.
Index: gcc/combine.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/combine.c,v
retrieving revision 1.124
diff -u -p -r1.124 combine.c
--- combine.c 2000/04/25 00:40:36 1.124
+++ combine.c 2000/04/25 08:52:45
@@ -658,7 +658,8 @@ combine_instructions (f, nregs)
nextlinks;
nextlinks = XEXP (nextlinks, 1))
if ((next = try_combine (insn, XEXP (links, 0),
- XEXP (nextlinks, 0))) != 0)
+ XEXP (nextlinks, 0),
+ &new_direct_jump_p)) != 0)
goto retry;
}
More information about the Gcc-patches
mailing list