This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR46556 (poor address generation)
- From: "William J. Schmidt" <wschmidt at linux dot vnet dot ibm dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, bergner at vnet dot ibm dot com, rguenth at gcc dot gnu dot org
- Date: Wed, 05 Oct 2011 12:22:43 -0500
- Subject: Re: [PATCH] Fix PR46556 (poor address generation)
- References: <1317831212.4199.45.camel@oc2474580526.ibm.com> <4E8C8426.2090502@gnu.org>
On Wed, 2011-10-05 at 18:21 +0200, Paolo Bonzini wrote:
> On 10/05/2011 06:13 PM, William J. Schmidt wrote:
> > One other general question about the pattern-match transformation: Is
> > this an appropriate transformation for all targets, or should it be
> > somehow gated on available addressing modes on the target processor?
> >
> > Bootstrapped and regression tested on powerpc64-linux-gnu. Verified no
> > performance degradations on that target for SPEC CPU2000 and CPU2006.
> >
> > I'm looking for eventual approval for trunk after any comments are
> > resolved. Thanks!
>
> How do the costs look like for the two transforms you mention in the
> head comment of locally_poor_mem_replacement?
>
> Paolo
>
I don't know off the top of my head -- I'll have to gather that
information. The issue is that the profitability is really
context-sensitive, so just the isolated costs of insns aren't enough.
The forward propagation of the add into (mem (reg REG)) looks like a
slam dunk in the absence of other information, but if there are other
nearby references using nonzero offsets from REG, this just extends the
lifetimes of X and Y without eliminating the need for REG.