Grant Edwards wrote:
I've noticed that msp430-gcc 3.2.3 often generates
unnecessarily large frame sizes?


<snip>

Can you post some compilable code that demonstrates these issues? I haven't been able to reproduce them with simple test code - in every case, independent branches have re-used stack and/or register space for local variables, regardless of optimisation level.

You will find that for complicated code, the optimisation setting will make a difference - higher levels run more analysis routines and are therefore better at figuring out which code paths are independent, but may also use more space (stack or registers) to track temporary calculated data or to combine stack pointer manipulations.

In my experience, there is no point in ever compiling without at least -O1. The code generated at -O0 is far less readable, and therefore less useful for debugging, and you lose much of the compiler's warning abilities. There is no such thing as code that only runs correctly when compiled without optimisation, so there is very rarely use for it (except for testing like this).


Reply via email to