This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unreviewed fix for bootstrap failure
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: geoffk at geoffk dot org (Geoff Keating)
- Cc: rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Jul 2003 17:48:21 -0400 (EDT)
- Subject: Re: Unreviewed fix for bootstrap failure
> > I don't see any difference but I fail to see how this relates
> > to the issue of whether or not to track LABEL_NUSES for LABEL_REFs
> > in REG_NOTES. As far as I can tell, the fix to the label replacement
> > code doesn't restrict or change the use of LABEL_REFs in any way.
>
> Surely it does, because you can now no longer simply substitute a
> LABEL_REF that you find in a note because that label may have been
> deleted. Either we must check before substituting, or we must ensure
> that labels mentioned in notes don't get deleted.
If you have an indirect jump, you must ensure that all the labels that
might be used as targets don't get accidentally deleted. LABEL_REFs in
REG_EQUAL/REG_EQUIV notes don't just appear out of the blue. The
instructions that create the equivalence will either directly reference
the label or implicitly reference the label. If the reference is
implicit, then presumably LABEL_PRESERVE_P needs to be set. If it's
explicit in the rtl, LABEL_NUSES will be incremented and the label
shouldn't be deleted.
The note doesn't create a new target for an indirect jump. What the note
does is provide information that limits the potential targets. Thus,
it's unnecessary to rely on the note to prevent the label from being deleted.
In addition, a single REG_EQUAL/REG_EQUIV note isn't going to help when
you have more than one target for an indirect jump. So, I still think
this is the wrong way to keep labels from being deleted.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)