This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR31677 fixed by passing --param sra-max-structure-size=32
- From: Richard Sandiford <rsandifo at nildram dot co dot uk>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 27 Dec 2007 11:19:05 +0000
- Subject: Re: [PATCH] PR31677 fixed by passing --param sra-max-structure-size=32
- References: <20071224192645.GA16602@bromo.msbb.uc.edu>
Jack Howarth <howarth@bromo.msbb.uc.edu> writes:
> The attached patch modifies the gcc.dg/memcpy-1.c testcase to
> pass "--param sra-max-structure-size=32" as suggested by Andrew
> Pinksi in the bug report for PR 31677. This changes eliminates
> the memcpy-1.c testsuite failures at -m32 on powerpc-apple-darwin9.
> Okay for gcc trunk?
> Jack
>
> 2007-12-24 Jack Howarth <howarth@bromo.med.uc.edu>
> PR tree-optimization/31677
> * gcc.dg/memcpy-1.c: Pass "--param sra-max-structure-size=32".
FWIW, I found the test useful in its current from. As Janis said,
it failed at one time on mips*-linux-gnu, and it was actually this
test that showed we had a problem with the MIPS cost metrics.
The test passes with the revised (improved?) metrics.
I understand Andrew's argument: this test was added for a new feature of
SRA, so it's reasonable to add whatever options are necessary to force
the feature to trigger. However, if rewriting memcpy()s of:
struct a {int a,b,c;} a;
really is a win for a particular target, I think it is useful to check
that we rewrite it at -O2, rather than with a combination of options
that users are very unlikely to try. We can just skip the test on
targets where it isn't a win.
Is this test failing for PowerPC because we want it to, or because
the heuristics need tweaking?
Richard