This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFB] IRA and regclass both ignore '!' attribute


Vladimir Makarov <vmakarov@redhat.com> wrote on 10/31/2008 07:54:06 AM:
> The problem you mentioned (selecting GPR instead of FPR) could be solved 

> by putting one or more ? in the alternative to get the same effect you 
> are trying to achieve with this patch.  Imho, the patch you are 
> proposing probably decrease some gcc functionality. Probably ! was 
> supposed to be used only for reload.


The documentation says this about '!':
Disparage severely the alternative that the `!' appears in. This 
alternative can still be used if it fits without reloading, but if 
reloading is needed, some other alternative will be used.

While it says this about '?':
Disparage slightly the alternative that the `?' appears in, as a choice 
when no alternative applies exactly. The compiler regards this alternative 
as one unit more costly for each `?' that appears in it. 

So to me, it seems like regclass/IRA should treat '!' as discourage the 
alternative much more than '?' would do.  This is at least the way I am 
reading the documentation.  If the targets are not using '!' like the 
documentation says, I think that is just because regclass never took this 
into account.  Even '?' was not taken into account in regclass until 1998, 
at least 6 years after regclass was added.  I think it was just an 
oversight really. 



Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]