This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [middle-end] Add machine_mode to address_cost target hook
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Oleg Endo <oleg dot endo at t-online dot de>
- Cc: Georg-Johann Lay <gjl at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, law at redhat dot com, nickc at redhat dot com, geoffk at geoffk dot org, dje dot gcc at gmail dot com, joern dot rennecke at embecosm dot com, richard dot earnshaw at arm dot com, paul at codesourcery dot com, ramana dot radhakrishnan at arm dot com, eager at eagercon dot com, bonzini at gnu dot org, rdsandiford at googlemail dot com
- Date: Tue, 04 Sep 2012 12:02:27 -0300
- Subject: Re: [middle-end] Add machine_mode to address_cost target hook
- References: <1346287598.2407.90.camel@yam-132-YW-E178-FTW> <87hariaz1y.fsf@talisman.home> <1346505654.2200.25.camel@yam-132-YW-E178-FTW> <87wr0c6dst.fsf@talisman.home> <504335BD.7030701@gcc.gnu.org> <1346630332.2200.58.camel@yam-132-YW-E178-FTW> <1346745157.2322.14.camel@yam-132-YW-E178-FTW>
On Sep 4, 2012, Oleg Endo <oleg.endo@t-online.de> wrote:
> * config/mn10300/mn10300.c (mn10300_address_cost): Add
> machine_mode and address space arguments. Use GET_MODE (x) and
> ADDR_SPACE_GENERIC in recursive invocation.
Ok with a change, see below.
> * config/sh/sh.c (sh_address_cost): Likewise.
Ok, thanks.
> Index: gcc/config/mn10300/mn10300.c
> - total = mn10300_address_cost (XEXP (x, 0), speed);
> + total = mn10300_address_cost (XEXP (x, 0), GET_MODE (x),
> + ADDR_SPACE_GENERIC, speed);
Instead of ADDR_SPACE_GENERIC, this should be MEM_ADDR_SPACE (x), no?
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer