> On May 6, 2025, at 1:17 PM, Segher Boessenkool <seg...@kernel.crashing.org> 
> wrote:
> 
> ...
>>> As for MEM(MEM(xyz)) addressing modes I'm less sure - I suppose those
>>> are usually formed at RTL expansion time (rather than, say, by
>>> RTL combine)?  If PDP-11 is the only target with those then it might
>>> be easier to recover those post-LRA during late-combine or peephole
>>> or alternatively in a target specific pass?  But of course I know
>>> nothing about the constraints of said addressing mode or the challenges
>>> those present to LRA.
>> Double-indirect is *very* uncommon.  I wouldn't want to pollute LRA with 
>> support that for those addressing modes if we could avoid it.  Pushing 
>> it to the target seems better from an overall project maintenance 
>> standpoint, though it may not be the best solution for the targets which 
>> support double-indirect addressing modes.
> 
> It is pretty hard to work with double-indirect things, often have to
> make sure the two memory accesses are not to the same address, etc.

Types will prevent that, typically, but in any case double indirect like that 
is still fine, you just get the pointer in a roundabout way.  It would be 
different if the machine actually does a "keep following pointers until the 
'this is a pointer' flag is false" mode, which some old machines do.

        paul

Reply via email to