On Tue, 2007-05-29 at 16:13 -0700, Andrew Pinski wrote: > On 5/29/07, Jeffrey Law <[EMAIL PROTECTED]> wrote: > > I haven't followed PTR_PLUS development at all -- what specifically > > spurred you to hack on this Andrew? >
> Since we lose a > lot of alignment in 4.0 after > http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00020.html Ah. OK. There were easier things you could have done rather than make PTR_PLUS work. Obviously I'm happy that you've taken the harder path as it's clearly more correct than some of the other hacks that could have been done. > Which actually mention you were working on this before (but it looks > it was dropped by you). Correct. It was going to be a mess and other things became a priority. > > The next step is to see if that patch is no longer needed for hppa > (well and fixing the hppa back-end). I would expect you can kill that patch; I don't think you can "fix" the PA backend because RTL passes can muck this stuff up pretty badly (even if you have a solid definition of what REG_POINTER really means -- see the archives from the late 1990s and early 2000s) *If* you're going to twiddle the PA backend, then I would strongly suggest some checking code to verify that REG_POINTER is never set on both register operands in a reg+reg or reg + scale * index address. One of the things you might also want to look at is RTL propagation of REG_POINTER -- I'm pretty sure it's not all that good and with the lowering and mucking addresses that happens in RTL I'd be surprised if we're not missing any registers that can/should be marked with REG_POINTER. Jeff