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: Different register sets for local and global register allocation?


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



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