This is the mail archive of the gcc@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: Does IRA support spilling to registers instead of stack?


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.


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