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: Richard Earnshaw <rearnsha at arm 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" <law at redhat dot com>, "aoliva at redhat dot com" <aoliva at redhat dot com>, "nickc at redhat dot com" <nickc at redhat dot com>, "geoffk at geoffk dot org" <geoffk at geoffk dot org>, "dje dot gcc at gmail dot com" <dje dot gcc at gmail dot com>, "joern dot rennecke at embecosm dot com" <joern dot rennecke at embecosm dot com>, "paul at codesourcery dot com" <paul at codesourcery dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, "eager at eagercon dot com" <eager at eagercon dot com>, "bonzini at gnu dot org" <bonzini at gnu dot org>, "rdsandiford at googlemail dot com" <rdsandiford at googlemail dot com>
- Date: Tue, 04 Sep 2012 10:52:18 +0100
- 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 04/09/12 08:52, Oleg Endo wrote:
> On Mon, 2012-09-03 at 01:58 +0200, Oleg Endo wrote:
>> OKOK -- I'll do it :)
>> (within the next couple of days)
>>
>
> And so I did. Attached is an updated patch that adds the address space
> parameter to the address_cost function. I hope that this change does
> not reset the ACKs so far:
>
> [x] target-independent bits
> [ ] alpha [ ] arm [ ] avr [ ] bfin
> [ ] cr16 [ ] cris [ ] epiphany [ ] i386
> [ ] ia64 [ ] iq2000 [ ] lm32 [ ] m32c
> [ ] m32r [ ] mcore [ ] mep [x] microblaze
> [x] mips [ ] mmix [x] mn10300 [ ] pa
> [ ] rs6000 [ ] rx [ ] s390 [ ] score
> [x] sh [ ] sparc [ ] spu [ ] stormy16
> [ ] v850 [ ] vax [ ] xtensa
>
> Tested with 'make all-gcc' on SH xgcc and i386 native build.
> No functional changes, except on MIPS, as requested by Richard
> Sandiford.
>
> Cheers,
> Oleg
>
> ChangeLog:
>
> * hooks.c (hook_int_rtx_mode_as_bool_0): New function.
> * hooks.h (hook_int_rtx_mode_as_bool_0): Declare it.
> * output.h (default_address_cost): Add machine_mode
> and address space arguments.
> * target.def (address_cost): Likewise.
> * rtlanal.c (address_cost): Pass mode and address space to
> target hook.
> (default_address_cost): Add unnamed machine_mode and address
> space arguments.
> * doc/tm.texi: Regenerate.
> * config/alpha/alpha.c (TARGET_ADDRESS_COST): Use
> hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0.
> * config/arm/arm.c (arm_address_cost): Add machine_mode
> and address space arguments.
> * config/avr/avr.c (avr_address_cost): Likewise.
> * config/bfin/bfin.c (bfin_address_cost): Likewise.
> * config/cr16/cr16.c (cr16_address_cost): Likewise.
> * config/cris/cris.c (cris_address_cost): Likewise.
> * config/epiphany/epiphany.c (epiphany_address_cost): Likewise.
> * config/i386/i386.c (ix86_address_cost): Likewise.
> * config/ia64/ia64.c (TARGET_ADDRESS_COST): Use
> hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0.
> * config/iq2000/iq2000.c (iq2000_address_cost): Add
> machine_mode and address space arguments. Pass them on in
> recursive invocation.
> * config/lm32/lm32.c (TARGET_ADDRESS_COST): Use
> hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0.
> * config/m32c/m32c.c (m32c_address_cost): Add machine_mode
> and address space arguments.
> * config/m32r/m32r.c (TARGET_ADDRESS_COST): Use
> hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0.
> * config/mcore/mcore.c (TARGET_ADDRESS_COST): Likewise.
> * config/mep/mep.c (mep_address_cost): Add machine_mode
> and address space arguments.
> * config/microblaze/microblaze.c (microblaze_address_cost):
> Likewise.
> * config/mips/mips.c (mips_address_cost): Likewise.
> * config/mmix/mmix.c (TARGET_ADDRESS_COST): Use
> hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0.
> * 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.
> * config/pa/pa.c (hppa_address_cost): Add machine_mode and
> address space arguments.
> * config/rs6000/rs6000.c (rs6000_debug_address_cost): Likewise.
> (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead
> of hook_int_rtx_bool_0.
> * config/rx/rx.c (rx_address_cost): Add machine_mode and
> address space arguments.
> * config/s390/s390.c (s390_address_cost): Likewise.
> * config/score/score-protos.h (score_address_cost): Likewise.
> * config/score/score.c (score_address_cost): Likewise.
> * config/sh/sh.c (sh_address_cost): Likewise.
> * config/sparc/sparc.c (TARGET_ADDRESS_COST): Use
> hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0.
> * config/spu/spu.c (TARGET_ADDRESS_COST): Likewise.
> * config/stormy16/stormy16.c (xstormy16_address_cost): Add
> machine_mode and address space arguments.
> * config/v850/v850.c (TARGET_ADDRESS_COST): Use
> hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0.
> * config/vax/vax.c (vax_address_cost): Add machine_mode
> and address space arguments.
> * config/xtensa/xtensa (TARGET_ADDRESS_COST): Use
> hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0.
>
>
>
The arm bits are OK.
R.