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, PR43513] Replace vla with array.


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


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