[RFB] IRA and regclass both ignore '!' attribute
Vladimir Makarov
vmakarov@redhat.com
Fri Oct 31 15:47:00 GMT 2008
Andrew Pinski wrote:
> I noticed while looking into a register allocation issue in 4.1.1,
> that regclass was ignoring '!' attribute so it would sometimes give
> the wrong result so we get performance issue (selecting GPR instead of
> FPR). So I saw that IRA also ignore it too which seems wrong and
> seems like the code was copied from regclass. preprocess_constraints
> and find_reloads both take '!' into account.
>
> Can someone benchmark this on x86 and PPC? I can only really benchmark
> with a 4.3 or 4.1.1 based compiler with a subset of SPEC. The 4.1.1
> based compiler gets a nice but small 0.6% performance increase and a
> small code decrease.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * regclass.c (record_reg_classes): Take into account '!'.
> (record_reg_classes): Likewise.
>
Andrew, thanks for looking into RA problems. I think your patch should
be thoroughly tested not only for performance. Such changes might
break some ports. I tried this change when I worked on YARA project and
that time the result was negative. Therefore it is not used in IRA. I
think that there were some reasons for ignoring this in regclass too.
But may be I am wrong.
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.
But if you gets an approval you should change the documentation (for !
constraint) too.
More information about the Gcc-patches
mailing list