On Sun, 2012-09-02 at 12:32 +0200, Georg-Johann Lay wrote:
> Richard Sandiford schrieb:
> > Oleg Endo <oleg.e...@t-online.de> writes:
> >> On Sat, 2012-09-01 at 10:10 +0100, Richard Sandiford wrote:
> >>
> >>> Thanks for doing this.  We should perhaps add the address space too,
> >>> but if you don't feel like redoing the whole patch, that can wait until
> >>> someone wants it.
> >> I just had a look at the address space thing...
> >> There are already target hook overloads with address space parameters,
> >> like legitimate_address_p and legitimize_address.  Paolo suggested to do
> >> something similar a while ago:
> >> http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01191.html
> >>
> >> .. but somehow this never made it into mainline?!
> >>
> >> Maybe it would be better to ...
> >> a) Add an 'address_cost' overload to the existing onces.
> >>    (at least it would be consistent...)
> >> b) Remove the overloads altogether and add the address space arg to the
> >> original funcs.
> >>
> >> Personally, I'd probably favor b).  Some targets (e.g. rl78) already
> >> override the address space overloads and just ignore the address space
> >> arg.  Either way, maybe it's better to do it in a separate patch.  This
> >> looks a bit like a pandora's box :)
> > 
> > Well, I certainly wasn't suggesting you had to do anything with
> > overloaded hooks (which I agree are unfortunate).  It's just that
> > rtlanal.c:address_cost already gets an address space argument, so if
> > we're going through all the ports adding the mode argument to the hook,
> > it seemed a pity not to add the address space argument at the same time.
> 
> Agreed.
> 
> It's not possible to determine the costs from the address and the mode
> alone, cf. HImode and the address spaces of the avr port for example.
> 
> Costs are very different depending no the address space and strangely
> the address space isnot part of the address but only of the surrounding
> mem...

OKOK -- I'll do it :)
(within the next couple of days)

Cheers,
Oleg

Reply via email to