On 2010-06-15, Grant Edwards <[email protected]> wrote:
> On 2010-06-15, JMGross <[email protected]> wrote:
>
>
>> The suggested compiler/linker flags, however, let the compiler treat
>> each function as a separate compilation unit, starting at its own
>> 0-offset address.
>> [...]

>> Also, it keeps the compiler for doing optimizations like common
>> subexpression elimination or using the most efficient way to call
>> functions or access variables, as they are all referenced as 
>> externals.
>
> I'd also be interested in seeing examples of that.

I've only got one MSP430 project laying around at the moment, and it's
pretty small: only about 1KB of code.  Compiling with -O2 generates
the exact same code with -ffunction-sections as it does without.

If somebody does come across a situation where -ffunction-sections
causes worse (or just different) code to be generated, it would be
nice if you could let the list know.  Even if there isn't anything we
can do to improve the code generation, it will at least allow other
mspgcc users to make an intelligent tradeoff decision.

-- 
Grant Edwards               grant.b.edwards        Yow! ONE LIFE TO LIVE for
                                  at               ALL MY CHILDREN in ANOTHER
                              gmail.com            WORLD all THE DAYS OF
                                                   OUR LIVES.


Reply via email to