|
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) |
Hi,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 forumfor 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 optimizationsthat 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 #define MODES_TIEABLE_P 0 to #define MODES_TIEABLE_P 1. My tests have shown that *with* this change, about 15 testcases in the gcctestsuite work that did not beforehand and the code becomes considerably tighter. Yours, Björn
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-sectionsfunction-sections was very helpful here as avr-size -A shows the code size for every function separately.
HTH Rolf
[Prev in Thread] | Current Thread | [Next in Thread] |