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

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

Re: [avr-gcc-list] Unused registers saves/restores ?


From: eric
Subject: Re: [avr-gcc-list] Unused registers saves/restores ?
Date: Mon, 9 Jun 2003 22:20:51 GMT

> 10 Jun 2003 08:12 Eric wrote:
> > > Hello all,
> > >
> > > Compiler:
> > >   avr-gcc --version
> > >   avr-gcc (GCC) 3.3.1 20030519 (prerelease)
> > >
> > > Programm:
> > >   typedef struct { long a; int b; } lo_in;
> > >
> > >   lo_in foo_lo_in (void)
> > >   {
> > >       lo_in x;
> > >       x.a = 1;
> > >       x.b = 2;
> > >       return x;
> > >   };
> > >
> > > Compile with:
> > >   avr-gcc -O3 -S foo_lo_in.c
> > >
> > > Result: r2,3,4,7,... not used, but saved/restored:
> >
> > Do you get the same with other optimizations? 
Including -Os?
> >
> > Eric
> 
> avr-gcc -Os -S foo_lo_in.c  ==>  roughly the same 
(r8,r9,...):
> 
<snip> 
> avr-gcc -O3 -fssa -S foo_lo_in.c  ==>
>       internal compiler error: in extract_insn, at 
recog.c:2175
> 

>From the GCC 3.3 manual:

------
-fssa 
     Perform optimizations in static single assignment 
form. Each function's flow graph is translated into SSA 
form, optimizations are performed, and the flow graph is 
translated back from SSA form. Users should not specify 
this option, since it is not yet ready for production use. 
------

So it's probably best to not use this option.

Is there an optimization level where it doesn't produce a 
problem? (i.e. -O0, -O1, -O2)

Eric






reply via email to

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