This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [g++ 2.95.1] bigger stack with optimize


At 09:20 06.12.99 , Jean-Francois MOINE wrote:

>Compiling the following source for Sparc or for PowerPC gives a bigger
>stack with the '-O2' option.
>
>Sparc
>   - without -O2:
>         f1__2cl:
>         .LLFB1:
>                 !#PROLOGUE# 0
>                 save    %sp, -176, %sp
>   - with -O2:
>         f1__2cl:
>         .LLFB1:
>                 !#PROLOGUE# 0
>                 save    %sp, -304, %sp
>
>PowerPC
>   - without -O2:
>         f1__2cl:
>                 stwu 1,-48(1)
>   - with -O2:
>         f1__2cl:
>                 stwu 1,-64(1)

gcc-2.95.2 fixed a bug in this area, please try it.
In any case, at least on PPC, the stack size change in your example is only 
marginal, and may simply be caused by the compiler using more registers. 
Then the question would be if the code quality got better or worse.

Franz.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]