This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: discouraging register use
- From: DJ Delorie <dj at redhat dot com>
- To: rth at redhat dot com, gcc at gcc dot gnu dot org
- Date: Wed, 5 Jan 2005 00:00:24 -0500
- Subject: Re: discouraging register use
- References: <200412302354.iBUNsiBH002125@greed.delorie.com> <20041231062116.GA12583@redhat.com> <200501032022.j03KM6GG005893@greed.delorie.com>
> > > [(set (match_operand:SI 0 "" "c,c,?m,?m")
> > > (plus:SI (match_operand:SI 1 "" "0,0,0,0")
> > > (match_operand:SI 1 "" "c,?m,c,?m")))]
> >
> > Yes, that looks plausible. The other way isn't going to work because
> > you penalize c at the same time as m by using "?cm".
> >
> > Does it actually work?
>
> One case I tried seems to work,
I found out a seemingly fundamental breakage for this.
In reload.c, we read:
/* If this alternative can be made to work by reloading,
and it needs less reloading than the others checked so far,
record it as the chosen goal for reloading. */
Apparently, if reloading is needed, ONE alternative is chosen, and
reload tries to make it work. If it fails, there doesn't seem to be a
mechanism for trying other alternatives to see if they work. Am I
reading this right?