avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] Can someone benchmark this option please


From: Weddington, Eric
Subject: RE: [avr-gcc-list] Can someone benchmark this option please
Date: Wed, 23 Jul 2008 12:12:18 -0600

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Weddington, Eric
> Sent: Wednesday, July 23, 2008 11:18 AM
> To: Andy H; AVR-GCC
> Subject: RE: [avr-gcc-list] Can someone benchmark this option please
> 
>  
> 
> > -----Original Message-----
> > From: 
> > address@hidden 
> > [mailto:address@hidden
> > org] On Behalf Of Andy H
> > Sent: Tuesday, July 22, 2008 6:40 PM
> > To: AVR-GCC
> > Subject: [avr-gcc-list] Can someone benchmark this option please
> > 
> > Hi,
> > 
> > I have noted problem where gcc is optimizing if-then-else 
> > constructs - 
> > with disastrous results. For example:
> > 
> > if (a  >= 0)
> >   return 8;
> > else
> >  return 0;
> > 
> > (This is now reported as bug.)
> > 
> > Can folks try the following gcc option
> > 
> >  -fno-if-conversion
> > 
> > on their own code at -Os optimization, and see if this produce 
> > better/worse or same code? This will help figure if the whole pass 
> > should be skipped - or whether it still contains useful 
> optimizations.
> > 
> 
> Hi Andy,
> 
> I tried it on the BC100 Kit code for gcc, which uses these options:
> 
> -mmcu=attiny861
> -gdwarf-2 
> -Os 
> -funsigned-char 
> -funsigned-bitfields 
> -fpack-struct 
> -fshort-enums 
> -Wall 
> -Wstrict-prototypes 
> -std=gnu99 
> -ffunction-sections 
> -fno-inline-small-functions 
> -fno-split-wide-types
> 
> When I added -fno-if-conversion, there was no change in code 
> size: 5588 bytes.

I also tried it on the Butterfly Kit code for gcc. It saved a whopping 2 bytes:
Baseline: 13876 bytes
With -fno-if-conversion flag: 13874 bytes.

Eric




reply via email to

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