Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-08 Thread Georg-Johann Lay
Hans-Peter Nilsson schrieb: Oleg Endo wrote: Georg-Johann Lay wrote: The change is definitely in the right direction, but I wonder how it helps to fix code bloats of 300%-400% as in PR52543? I'm not familiar with the AVR parts. BTW, There was a small change in lower-subreg which required some

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-08 Thread Hans-Peter Nilsson
Oleg Endo wrote: > On Thu, 2012-09-06 at 14:41 +0200, Georg-Johann Lay wrote: > > The change is definitely in the right direction, but I wonder > > how it helps to fix code bloats of 300%-400% as in PR52543? > > I'm not familiar with the AVR parts. > BTW, There was a small change in lower-subreg wh

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-06 Thread Oleg Endo
On Thu, 2012-09-06 at 14:41 +0200, Georg-Johann Lay wrote: > Oleg Endo schrieb: > > On Wed, 2012-09-05 at 14:39 -0400, DJ Delorie wrote: > >> I don't feel the m32c change needs my specific ack, it's a harmless > >> change that goes with the ack for the feature itself. > >> > >> However, I will note

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-06 Thread Georg-Johann Lay
Oleg Endo schrieb: On Wed, 2012-09-05 at 14:39 -0400, DJ Delorie wrote: I don't feel the m32c change needs my specific ack, it's a harmless change that goes with the ack for the feature itself. However, I will note that m32c does have different costs for addresses in different address spaces, a

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-06 Thread Oleg Endo
On 6 Sep 2012, at 11:18, domi...@lps.ens.fr (Dominique Dhumieres) wrote: Could you please commit this (I can't at the moment)? Sorry, I don't have write access. OK, then I will commit it later today. Cheers, Oleg

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-06 Thread Dominique Dhumieres
> Could you please commit this (I can't at the moment)? Sorry, I don't have write access. Dominique

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-06 Thread Oleg Endo
On Thu, 2012-09-06 at 09:49 +0200, Dominique Dhumieres wrote: > Oleg, > > Bootstrap fails at revision 190996 on powerpc-apple-darwin9 with: > > g++ -c -g -DIN_GCC -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing > -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic > -Wno-long

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-06 Thread Dominique Dhumieres
Oleg, Bootstrap fails at revision 190996 on powerpc-apple-darwin9 with: g++ -c -g -DIN_GCC -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFI

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-05 Thread Oleg Endo
On Wed, 2012-09-05 at 14:39 -0400, DJ Delorie wrote: > I don't feel the m32c change needs my specific ack, it's a harmless > change that goes with the ack for the feature itself. > > However, I will note that m32c does have different costs for addresses > in different address spaces, at least when

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-05 Thread DJ Delorie
I don't feel the m32c change needs my specific ack, it's a harmless change that goes with the ack for the feature itself. However, I will note that m32c does have different costs for addresses in different address spaces, at least when -Os.

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-05 Thread Oleg Endo
On Wed, 2012-09-05 at 13:44 +0400, Denis Chertykov wrote: > 2012/9/5 Oleg Endo : > > Updated ACK table: > > > > [x] target-independent bits > > [ ] alpha [x] arm [ ] avr [ ] bfin > > [ ] cr16 [x] cris [x] epiphany[ ] i386 > > [ ] ia64 [x] iq2000[ ] lm32

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-05 Thread Denis Chertykov
2012/9/5 Oleg Endo : > Updated ACK table: > > [x] target-independent bits > [ ] alpha [x] arm [ ] avr [ ] bfin > [ ] cr16 [x] cris [x] epiphany[ ] i386 > [ ] ia64 [x] iq2000[ ] lm32[ ] m32c > [x] m32r [x] mcore [ ] mep [x] microblaze

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-05 Thread Richard Earnshaw
On 05/09/12 09:16, Oleg Endo wrote: > Updated ACK table: > > [x] target-independent bits > [ ] alpha [x] arm [ ] avr [ ] bfin > [ ] cr16 [x] cris [x] epiphany[ ] i386 > [ ] ia64 [x] iq2000[ ] lm32[ ] m32c > [x] m32r [x] mcore [ ] mep

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-05 Thread Uros Bizjak
On Wed, Sep 5, 2012 at 10:16 AM, Oleg Endo wrote: > Updated ACK table: > > [x] target-independent bits > [ ] alpha [x] arm [ ] avr [ ] bfin > [ ] cr16 [x] cris [x] epiphany[ ] i386 > [ ] ia64 [x] iq2000[ ] lm32[ ] m32c > [x] m32r [x] mcore

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-05 Thread Oleg Endo
Updated ACK table: [x] target-independent bits [ ] alpha [x] arm [ ] avr [ ] bfin [ ] cr16 [x] cris [x] epiphany[ ] i386 [ ] ia64 [x] iq2000[ ] lm32[ ] m32c [x] m32r [x] mcore [ ] mep [x] microblaze [x] mips [x] mmix [x] m

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Georg-Johann Lay
Joern Rennecke: David Edelsohn: Oleg Endo: Hmm .. the ACK status so far is: Not sure if we are supposed to acknowledge all the straigtforward argument additions... at any rate, the epiphany hunk is OK. I think I'll make use of the new functionality eventually, but prefer to be able to test

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Hans-Peter Nilsson
On Tue, 4 Sep 2012, 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 chan

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Joern Rennecke
Quoting David Edelsohn : On Tue, Sep 4, 2012 at 2:57 PM, Oleg Endo wrote: Hmm .. the ACK status so far is: Not sure if we are supposed to acknowledge all the straigtforward argument additions... at any rate, the epiphany hunk is OK. I think I'll make use of the new functionality eventually

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread David Edelsohn
On Tue, Sep 4, 2012 at 2:57 PM, Oleg Endo wrote: > Hmm .. the ACK status so far is: > > [x] target-independent bits > [ ] alpha [x] arm [ ] avr [ ] bfin > [ ] cr16 [ ] cris [ ] epiphany[ ] i386 > [ ] ia64 [x] iq2000[ ] lm32[ ] m32c > [x] m32r

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Oleg Endo
On Tue, 2012-09-04 at 12:02 -0300, Alexandre Oliva wrote: > > 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); >

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Richard Sandiford
Oleg Endo writes: > 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 t

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Alexandre Oliva
On Sep 4, 2012, Oleg Endo 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)

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Richard Guenther
On Tue, Sep 4, 2012 at 12:38 PM, Paolo Bonzini wrote: > Il 04/09/2012 09:52, Oleg Endo ha scritto: >> [x] target-independent bits >> [ ] alpha [ ] arm [ ] avr [ ] bfin >> [ ] cr16 [ ] cris [ ] epiphany[ ] i386 >> [ ] ia64 [ ] iq2000[ ] lm32[ ] m32c

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 09:52, Oleg Endo ha scritto: > [x] target-independent bits > [ ] alpha [ ] arm [ ] avr [ ] bfin > [ ] cr16 [ ] cris [ ] epiphany[ ] i386 > [ ] ia64 [ ] iq2000[ ] lm32[ ] m32c > [ ] m32r [ ] mcore [ ] mep [x] microblaze

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Richard Earnshaw
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 d

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread nick clifton
Hi Oleg, 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 [ ] epip

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-04 Thread Oleg Endo
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-ind

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-02 Thread Oleg Endo
On Sun, 2012-09-02 at 12:32 +0200, Georg-Johann Lay wrote: > Richard Sandiford schrieb: > > Oleg Endo 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 th

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-02 Thread Georg-Johann Lay
Richard Sandiford schrieb: Oleg Endo 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 add

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-02 Thread Richard Sandiford
Oleg Endo 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

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-01 Thread Oleg Endo
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

Re: [middle-end] Add machine_mode to address_cost target hook

2012-09-01 Thread Richard Sandiford
Oleg Endo writes: > While experimenting a little bit with an idea for an address mode > selection RTL pass for SH, I realized that SH's sh_address_cost function > is quite broken. When trying to fix it, I ran against a wall, since the > mode of the MEM is not passed to the target hook function, a

Re: [middle-end] Add machine_mode to address_cost target hook

2012-08-31 Thread Alexandre Oliva
On Aug 29, 2012, Oleg Endo wrote: > * config/mn10300/mn10300.c (mn10300_address_cost): Add > machine_mode argument. Use GET_MODE (x) in recursive > invocation. > * config/sh/sh.c (sh_address_cost): Likewise. These are ok, thanks. -- Alexandre Oliva, freedom fighter

Re: [middle-end] Add machine_mode to address_cost target hook

2012-08-30 Thread Michael Eager
On 08/29/2012 05:46 PM, Oleg Endo wrote: Hello, While experimenting a little bit with an idea for an address mode selection RTL pass for SH, I realized that SH's sh_address_cost function is quite broken. When trying to fix it, I ran against a wall, since the mode of the MEM is not passed to the

[middle-end] Add machine_mode to address_cost target hook

2012-08-29 Thread Oleg Endo
Hello, While experimenting a little bit with an idea for an address mode selection RTL pass for SH, I realized that SH's sh_address_cost function is quite broken. When trying to fix it, I ran against a wall, since the mode of the MEM is not passed to the target hook function, as it is e.g. in leg