Different register sets for local and global register allocation?
Jim Wilson
wilson@specifixinc.com
Tue May 4 23:38:00 GMT 2004
Jan Hoogerbrugge wrote:
> Is it possible to specify that part of the registers are available
> for local register allocation only and not for global register
> allocation?
No, but it might be possible to add.
The global register allocation pass in in global.c. The entry point is
global_alloc. Near the top, there is a variable no_global_alloc_regs
that gets initialized to regs that are unsafe to use across basic
blocks. Currently this only gets a few obvious things added to it, such
as eliminable registers. You could perhaps add a new macro, in the
style of CALL_CLOBBERED_REGS, that specifies target dependent registers
to add here.
You also need to make sure that reload doesn't try to use one of these
registers across a basic block.
You will also have to check the new register allocator, in the ra-*.c
files, and make this work there too.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list