discouraging register use

Geoffrey Keating geoffk@geoffk.org
Fri Jan 7 00:07:00 GMT 2005


DJ Delorie <dj@redhat.com> writes:

> > > >   [(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?

I think the best way to put this is that the chosen alternative must
be chosen so that reloading will succeed.



More information about the Gcc mailing list