avr-libc-dev
[Top][All Lists]
Advanced

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

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


From: Dmitry K.
Subject: Re: [avr-libc-dev] Considerable Compiler improvement neeeds testing
Date: Tue, 1 Feb 2005 08:17:25 +1000
User-agent: KMail/1.5

On Monday 31 January 2005 02:48, Björn Haase wrote:
[...]
> 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
> #define MODES_TIEABLE_P 0
> to
> #define MODES_TIEABLE_P 1
> . 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 tighter.

I have try to apply it for avr-gcc 3.3.5. (Sorry, it was no time for
others).

Functions are from avr-libc-1.2.0, without ones too small or asm.
(`*-new' are from patches).

Results are in form: prog_words + stack_bytes

-mmcu=atmega8 -Os -frename-registers
                3.2.3   3.3.5   3.3.5   3.4.3   4.0     4.0-nrr
MODES_TIE:              0       1

bsearch          69+12   68+12   68+12   67+12   66+12   66+12
bsearch-new      70+12   70+12   70+12   69+12   76+14   76+14
malloc          164+2   152+0   152+0   156+2   158+2   158+2
free             99+2    92+2    92+2    92+2    86+2    86+2
qsort           464+22  450+22  443+22  450+22  412+22  412+22
do_random       102+14   91+10   87+10   93+10  173+14  173+14
realloc         240+12  230+12  229+12  228+12  233+14  234+14
strtol          308+36  291+36  291+36  295+36  318+36  312+36
strtol-new      286+16  276+16  276+16  281+16  297+17  297+17
strtoul         277+29  260+29  258+29  261+29  278+27  278+27
strtoul-new     278+16  265+16  265+16  264+16  317+21  317+21
vfprintf        672+36  652+36  649+36  626+36  694+37  694+37
vfscanf         655+24  637+24  637+24  601+24  725+39  726+39

Notes:
    * Stack usage -- without nested calls.
    * 4.0 is 20050116
    * `-frename-registers' is not recommended in 4.0, so `4.0-nrr' is
    without this option.
    * MODES_TIE  -- MODES_TIEABLE_P in `avr.h'





reply via email to

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