[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Considerable Compiler improvement neeeds testing

From: Rolf Ebert
Subject: Re: [avr-libc-dev] Considerable Compiler improvement neeeds testing
Date: Wed, 02 Feb 2005 15:22:51 +0100
User-agent: Opera M2/7.54 (Win32, build 3865)

On Sun, 30 Jan 2005 17:48:16 +0100, Björn Haase <address@hidden> wrote:


find enclosed a mail posted by Andy Hutchinson on the address@hidden list. I forward this mail to this list since I think that this is the better forum
for discussing this issue.

The story is:
It seems that the gcc internals documentation was kind of misleading and for this reason avr-gcc was not able to take benefit of a couple of optimizations
that avoid useless moves across registers when dealing with variables of
different byte sizes.
The change suggested by Andy Hutchinson affects one single line in
the gcc/config/avr/avr.h that presently reads
. My tests have shown that *with* this change, about 15 testcases in the gcc
testsuite work that did not beforehand and the code becomes considerably



I applied the proposed patch to the current gcc-3.4 branch of AVR-Ada, the Ada cross compiler for AVR. I tested it with some example programs and also my main application (a data logger based on Butterfly (mega169)). No use of floating point vars.

 - I did not detect any functional regression,
 - most functions (~95%) do not change size at all,
 - a few functions shrinked by 1 - 7% in code size,
 - a single function increased from 224 to 232 bytes,
 - the main application shrinked from xx to 1866 bytes.
 - I did not check RAM usage.

Non-Ada-specific compile options: -Os -ffunction-sections

function-sections was very helpful here as avr-size -A shows the code size for every function separately.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]