This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Optimize COMPOUND_LITERAL_EXPRs inside of CONSTRUCTORs in automatic var initializers (PR c/34146)
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jakub Jelinek" <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Nov 2007 11:14:26 +0100
- Subject: Re: [PATCH] Optimize COMPOUND_LITERAL_EXPRs inside of CONSTRUCTORs in automatic var initializers (PR c/34146)
- References: <20071119232655.GM5451@devserv.devel.redhat.com>
On Nov 20, 2007 12:26 AM, Jakub Jelinek <firstname.lastname@example.org> wrote:
> 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
> Bootstrapped/regtested on x86_64-linux, bootstrap/regression testing
> pending on ppc64-linux. Ok for trunk?
Thanks for working on this,
> 2007-11-19 Jakub Jelinek <email@example.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.