This is the mail archive of the 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: [PATCH 1/3] SH-2A FDPIC: New pattern: use_initial_val

On 08/19/2010 12:33 PM, Daniel Jacobowitz wrote:
> On Thu, Aug 19, 2010 at 08:55:20PM +0200, Bernd Schmidt wrote:
>> For FD-PIC, the incoming PIC reg is loaded into a pseudo with the
>> initial values machinery.  The problem occurs if during expand we
>> already had something that required the PIC register, so the pseudo was
>> set up, but all the uses (and hence the initializing insn) were
>> optimized away.  So there really isn't anywhere to put it anymore in
>> this case.
> FWIW, I once tried to make the MIPS pic base into a pseudo, and
> encountered this same problem - I eventually gave up, but maybe it can
> be done the same way.

Yeah, same with Alpha.  In the end I left it as a fixed register,
and use peep2's to avoid reloading it after calls when it's dead.

Indeed, I don't even expose the use of the PIC register before
reload is complete; the optimizers are much happier with a bare
(symbol_ref "sdata_sym") than they are with an expression that
involves the pic register.

SH has only 16 registers though, so I can understand the strong
desire to retain the register allocation freedom.


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