This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Does IRA support spilling to registers instead of stack?
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: dpadgett_mail-000 at yahoo dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 19 Jul 2011 09:33:16 -0400
- Subject: Re: Does IRA support spilling to registers instead of stack?
- References: <1311024006.29371.YahooMailClassic@web82603.mail.mud.yahoo.com>
On 07/18/2011 05:20 PM, dpadgett_mail-000@yahoo.com wrote:
Hello,
Does gcc IRA provide a mechanism to support spilling to registers instead of the stack? For the particular target I'm looking at, there are some non-general-purpose registers that can be copied to and from more quickly than the stack, so would be preferable to use as a form of shareable spill slot in some cases. One limitation, which is perhaps a significant one, is that these registers are not callee save, so one would only want to save to and restore from them when there is no intervening function call. If there is no current support for such a mechanism, any opinions on the value and practicality of adding one would be much appreciated.
Thanks, Don
It might work for new IRA without cover classes.
Pseudos will have classes containing usual registers and these special
registers because they are really less costly than memory. If a pseudo
crosses a call, the special registers could be more costly than memory.
All you need is to define the right costs for register and memory move
cost hooks to achieve better costs for regular registers, worse costs
for the special registers, and the worst cost for memory. If the pseudo
intersects the call, the worst cost should be for the special
registers. It can be achieved by right definition of move cost between
special registers and memory.