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: Only hard regs with pseudos considered for save/restore across calls?


On Thu, Jun 05, 2003 at 06:17:31PM -0500, Fred Fish wrote:
> How much work do you feel it would be to change this so that (at least
> optionally) EVERY hard register that is clobbered across a function
> call gets preserved?

Lots, and I think it's pointless.

I think your main problem is that you're not looking at your builtin
functions properly.  Just because a user gives a particular number,
indicating a particular cc register, does that mean you REALLY have
to use that cc register number?  Probably not.

A better solution might be to have the builtin functions map the 
user-specified number to a set of pseudos.  Then let the register
allocator do its thing like it's supposed to, spilling and restoring
the cc register as necessary.

Indeed, you might find that, due to code motion, the register allocator
might come up with a better allocation than that provided by the user.


r~


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