This is the mail archive of the
mailing list for the GCC project.
Re: Controlling instruction alternative selection
- From: Paul Shortis <pshortis at dataworx dot com dot au>
- To: Jim Wilson <jim dot wilson at linaro dot org>, gcc at gcc dot gnu dot org
- Date: Fri, 21 Aug 2015 09:20:02 +1000
- Subject: Re: Controlling instruction alternative selection
- Authentication-results: sourceware.org; auth=none
- References: <cb805a481c20ec3ab641d413da4efede at dataworx dot com dot au> <55BFC867 dot 6030301 at linaro dot org>
- Reply-to: pshortis at dataworx dot com dot au
It took me a while to get back to this problem but as you
suggested, exposing only the three address instructions prior to
reload... in conjunction with implementing
has produced good results. After taking these measures I didn't
have to disparage any alternatives in the patterns.
On 04/08/15 06:00, Jim Wilson wrote:
On 07/30/2015 09:54 PM, Paul Shortis wrote:
Resulting in ...
error: unable to find a register to spill in class âGP_REGSâ
enabling lra and inspecting the rtl dump indicates that both
alternatives (R and r) seem to be equally appealing to the allocater so
it chooses 'R' and fails.
The problem isn't in lra, it is in reload. You want lra to use the
three address instruction, but you then want reload to use the two
Using constraint disparaging (?R) eradicates the errors, but of course
that causes the 'R' three address alternative to never be used.
You want to disparage the three address alternative in reload, but not
in lra. There is a special code for that, you can use ^ instead of ? to
make that happen. That may or may not help though.
There is also a hook TARGET_CLASS_LIKELY_SPILLED_P which might help.
You should try defining this to return true for the 'R' class if it