This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv2, RFA] Pass address space to REGNO_MODE_CODE_OK_FOR_BASE_P
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: avr at gjlay dot de (Georg-Johann Lay)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Oct 2011 15:00:31 +0200 (CEST)
- Subject: Re: [PATCHv2, RFA] Pass address space to REGNO_MODE_CODE_OK_FOR_BASE_P
Georg-Johann Lay wrote:
> Does it make sense to extend LEGITIMIZE_RELOAD_ADDRESS, too?
>
> For the target that needs your extension (AVR) there are different addressing
> capabilities depending on AS and there is an implementation of L_R_A.
I'd say that it is an independent issue. LEGITIMIZE_RELOAD_ADDRESS is
supposed to used for performance improvements only, it should never be
necessary for correctness. With the current code, the target just doesn't
get the opportunity to optimize address reloads for non-generic address
spaces -- so far, this has never come up as requirement.
If you'd like to add such optimizations for AVR, it would be straightforward
to pass the address space argument to LEGITIMIZE_RELOAD_ADDRESS. But that
can certainly be done as an independent patch.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com