This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/58817] optimize alloca with constant size


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58817

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Transforming VLAs that way isn't a good idea, at least if the size isn't really
small, at least when the VLA isn't in a scope that dies at the function's end
(or if there is a chance the function might be inlined because of that
optimization).  Because, unlike normal alloca, VLAs are deallocated already
when leading the scope they were declared in, and tons of programs rely on that
deallocation, otherwise you might have too big stack requirements.


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