[U-Boot-Users] Code duplication...

Håvard Skinnemoen hskinnemoen at gmail.com
Sat Jun 23 01:01:58 CEST 2007


On 6/22/07, Robin Getz <rgetz at blackfin.uclinux.org> wrote:
> And when compiling with gcc -Os, __inline__  is a suggestion, not a requirement.

It's a suggestion no matter if you use -Os or not. But -Os makes the
inlining limits so low that it actually tends to increase the size of
the program...

I haven't looked specifically at u-boot, but I've seen the same issue
in other projects I've been running on avr32. Tweaking the limits
using --param max-inline-insns-single and --param
max-inline-insns-auto often makes the code smaller and faster.

IIRC, a limit somewhere between 16 and 32 yields good results when
optimizing for size. The optimum value may be architecture-dependent
of course...

> First question is - does anyone see the same thing on their platform - or is it something wonky with my toolchain.

Yes, I think it's a general problem.

> Next question is - for a savings of 250 bytes, does anyone care?

Saving 250 bytes _and_ making the code run faster sounds like a good
deal to me :-)

Haavard




More information about the U-Boot mailing list