This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR43513] Replace vla with array.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Tom de Vries <vries at codesourcery dot com>
- Cc: rguenther at suse dot de, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 27 Jul 2011 13:21:25 +0200
- Subject: Re: [PATCH, PR43513] Replace vla with array.
- References: <4E2FED87.8020300@codesourcery.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jul 27, 2011 at 01:50:47PM +0300, Tom de Vries wrote:
> I have a patch set for bug 43513 - The stack pointer is adjusted twice.
>
> 01_pr43513.3.patch
> 02_pr43513.3.test.patch
> 03_pr43513.3.mudflap.patch
>
> The patch set has been bootstrapped and reg-tested on x86_64.
>
> I will sent out the patches individually.
>
> The patch replaces a vla __builtin_alloca that has a constant argument with an
> array declaration.
IMHO you don't want to do this unconditionally, for small sizes it might be
ok, but for larger sizes e.g. some unlikely code path might use a VLA for
very large allocation to keep the default stack usage in reasonable limits,
or to be able to reuse that stack for something else, etc.
Jakub