This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Only hard regs with pseudos considered for save/restore across calls?
- From: fnf at intrinsity dot com (Fred Fish)
- To: rth at redhat dot com (Richard Henderson)
- Cc: fnf at intrinsity dot com, gcc at gcc dot gnu dot org
- Date: Thu, 5 Jun 2003 18:17:31 -0500 (CDT)
- Subject: Re: Only hard regs with pseudos considered for save/restore across calls?
- Reply-to: fnf at intrinsity dot com (Fred Fish)
> > It appears to me that only pseudos that are allocated to hard registers that
> > are clobbered across calls are saved and restored across calls, and hard
> > registers that are never associated with a pseudo are not saved and restored
> > even when the compiler knows they are clobbered across a call.
>
> Correct.
OK, thanks for confirming my suspicion.
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? I.E. should a gcc guru be able to do in one day,
one week, or one month?
Are there any obvious undesirable side effects of making such a change?
> > However since cc0 gets directly allocated to $mcc0 at RTL generation time,
> > it never gets saved and restored.
>
> Well, don't do that then.
That is also a possibility, depending upon the answers to the above.
Thanks!
-Fred