Thanks. I'll pursue specifying a more detailed cost model using existing hooks to see if I can get the desired behavior.
Don --- On Tue, 7/19/11, Vladimir Makarov <vmaka...@redhat.com> wrote: > From: Vladimir Makarov <vmaka...@redhat.com> > Subject: Re: Does IRA support spilling to registers instead of stack? > To: dpadgett_mail-...@yahoo.com > Cc: gcc@gcc.gnu.org > Date: Tuesday, July 19, 2011, 8:33 AM > On 07/18/2011 05:20 PM, dpadgett_mail-...@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. >