On Tue, Oct 4, 2011 at 10:58 PM, Richard Henderson <r...@redhat.com> wrote: > On 10/04/2011 01:17 PM, Tom de Vries wrote: >> In general, to fold vlas (which are lowered to allocas) to normal >> declarations, >> if the alloca argument is constant. > > Ah. Ok, I suppose. How often are you seeing this happening? I can imagine > a few instances via inlining, but even there not so much... > >> Any guidance on what to do if we have to expand the >> __builtin_alloca_with_align >> to a function call, specifically, with the second argument? This is currently >> handled like this, which is not very nice: > > Don't do anything special. Just let it fall through as with alloca. This > should > never happen, except for stupid user tricks like > -fno-builtin-alloca_with_align. > And if the user does that, they get what they deserve wrt needing to implement > that function in their runtime.
Yes, especially as we only use builtin_alloca_with_align for VLAs. Setting the assembler name to alloca might be nice to users at least, the excess argument shouldn't be any problem (well, hopefully targets don't have a special ABI for alloca ...) Richard. > > r~ >