Painful problems with -fpic implementation on powerpc-sysv
Jeffrey A Law
law@cygnus.com
Wed Aug 26 18:28:00 GMT 1998
In message < 19980826121846.C1747@dot.cygnus.com >you write:
> On Wed, Aug 26, 1998 at 01:06:45AM -0600, Jeffrey A Law wrote:
> > First, having the PIC register be a pseudo is bad. This is the core
> > problem that we need to fix.
>
> It would be really nice if we could solve this, as I have plans to
> try exactly the same thing on x86, where added register pressure due
> to losing 1 of 6 registers is horrible.
It's certainly more painful on the x86 due to the shortage of regs.
> > This is non-optimal, but will work. Trying to allocate the PIC reg
> > via a pseudo will not because we can not allocate a pseudo for the
> > PIC register during the reload pass (or anytime after flow).
>
> A possible solution is not to create such a pseudo any longer, but
> instead to reload the PIC value into a hardreg via secondary reloads.
But you've got to find a solution to the calls to force_const_mem
which stuff things into readonly memory and give back a symbol_ref.
Calls to force_const_mem can occur after we've counted all the reload
regs, set the elimination offsets, etc in the "big while loop" in
reload1.c. Plus you've got to deal with the "can't allocate a new
reg after flow problem" too.
jeff
More information about the Gcc
mailing list