Local variables optimization

Ian Lance Taylor ian@airs.com
Sun Jul 24 05:55:00 GMT 2005


Hanzac Chen <hanzac@gmail.com> writes:

> Some idea: Maybe local stack use in the code compiled by GCC should be
> optimized 'cause some local variables are conditional. If the condition
> is not satisfied, then these variables don't need to be allocated from
> the stack (e.g. sub $VAR_SIZE, %esp).

You neglected to mention which version of gcc you were using, or which
target.  The description and test case sound like GCC PR 9997:
    http://gcc.gnu.org/PR9997
which was fixed for the 4.0 release.

Ian



More information about the Gcc mailing list