On Mon, Feb 10, 2014 at 8:33 PM, Alan Modra <amo...@gmail.com> wrote:
> On Mon, Feb 10, 2014 at 07:01:03PM -0500, David Edelsohn wrote:
>> On Mon, Feb 10, 2014 at 5:18 PM, Alan Modra <amo...@gmail.com> wrote:
>>
>> Shouldn't addr_op2 also be set from find_replacement?
>
> Sorry, I thought after I sent the email that I should have added some
> explanation of why certain parts need find_replacement and others
> don't.  We want just those parts of addresses that might have been
> reloaded.
>
> There's the case of the entire address being reloaded (actually, I'm
> not sure this one is needed) and then all the ones we do in the rs6000
> backend in legitimize_reload_address.  I think I found all the
> required parts but it certainly won't hurt if you check too.  Calling
> find_replacement when not strictly necessary will slow down gcc a
> little..

It looked like either piece of the address could be a more complicated
address that is reloaded, especially in a failure case, at least based
on the few other uses of find_replacement in other backends. But it is
difficult to determine.

The secondary_reload_inner code seems to be prepared for more
complicated addresses that could require reloads in the second
operand, but I agree that legitimize_reload_address should affect the
first operand.

- David

Reply via email to