This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Optimize COMPOUND_LITERAL_EXPRs inside of CONSTRUCTORs in automatic var initializers (PR c/34146)


On Nov 20, 2007 12:26 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> This patch extends a little bit the compound literal optimizations.
> In CONSTRUCTORs which initialize automatic vars there is no reason to
> differentiate between CONSTRUCTORs and COMPOUND_LITERAL_EXPRs
> if their addresses aren't being taken.
>
> The pr33723.c change is to avoid FAILs on that test on many architectures
> - the test regexps depended on the exact move_by_pieces etc. target
> parameters.
>
> Bootstrapped/regtested on x86_64-linux, bootstrap/regression testing
> pending on ppc64-linux.  Ok for trunk?

Ok.

Thanks for working on this,
Richard.

> 2007-11-19  Jakub Jelinek  <jakub@redhat.com>
>
>         PR c/34146
>         * c-gimplify.c (optimize_compound_literals_in_ctor): New function.
>         (c_gimplify_expr): Use it.
>
>         PR c/34146
>         * gcc.dg/tree-ssa/pr34146.c: New test.
>
>         PR testsuite/33978
>         * gcc.dg/tree-ssa/pr33723.c: Adjust scan pattern to make it less
>         dependent on target settings like move_by_pieces etc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]