[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Code Size produced by newer AVRGCC
From: |
Dan Larson |
Subject: |
Re: [avr-gcc-list] Code Size produced by newer AVRGCC |
Date: |
Sun, 17 Jun 2001 16:38:01 -0600 |
On Sun, 17 Jun 2001 19:54:59 +0300, Atanas Uzunov wrote:
>
>Why the code size produced by the new AVRGCC is so large?
>
One optimization that you want to be sure *NOT* to use when you want small
code space is "inlining". Some small library functions are added directly into
your code and may be duplicated in the compiler output as many times as they
are called. This can make code get huge, but it also makes it faster.
Generally optimizations for speed are incompatible with optimizations for
code size, and function "inlining" is a speed optimization..
Though I am not an AVR-GCC expert, I do have experience with other compilers
and my statement is just to be considered general advice.
As for an explanation as to why the newer version is worse, it may be that more
of the
library functions have been declared "inline" and are now being inlined by the
compiler where they were not before. Try finding a way to turn off the inlining
optimization
and see what your results are.
Dan