reload1: detect chained reloads

DJ Delorie dj@redhat.com
Thu Mar 2 02:13:00 GMT 2006


> Do you have any other CPU you can do a bootstrap on?  You're not
> likely to see a lot of RELOAD_FOR_OPERAND_ADDRESS reloads on x86_64.

Well, that's the problem, nobody else is likely to have this kind of
problem.  The only other port with this kind of reload issue is m68k,
and they admit they maintain their own patches so I don't expect the
unchanged fsf gcc to be a realistic test.

> This just doesn't look right.  For one thing, rld[i].in may be NULL.

For RELOAD_FOR_OPERAND_ADDRESS?  That's the only time this is called.

> And what if you get something along the lines of (plus (mem (reg r))
> (plus (mem (reg r)) (const_int 1))) The fact that the same value
> appers in rld[].in for both reloads doesn't imply that they are
> related, and I don't see why it is OK to assume that they won't both
> be needed at the same time.

Well, what I'm trying to solve is like (mem (mem (reg))).  Reload is
currently using two different registers for each address.  I need it
to use one, like this:

	mov	<reg>,a0
	mov	[a0],a0
	mov	[a0],a0

I could be more specific in my tests, if I knew more about reload.



More information about the Gcc-patches mailing list