This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: optimize x86 pic register loads
On Tue, May 28, 2002 at 06:52:06PM -0700, Dale Johannesen wrote:
> I've noticed this on ppc and have been thinking about ways to fix it.
> Wouldn't it be better to do this in target-independent fashion?
> Say, make a pass through the RTL towards the end and recompute
> current_function_uses_pic_offset_table correctly?
*shrug* Why bother if we're already computing regs_ever_live?
Besides, that's not really the end of the game.
My next step for x86 is to attempt to renumber the pic register
away from the call-saved ebx to one of the (few) call-clobbered
registers. This ought to help for small functions that just do
a very little bit of work, but touch global memory in the
process.
I don't know yet how often it will fire. My guess is "some".
A similar scheme on ppc would fire more often, since there are so
many more call-clobbered registers.
r~