This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [g++ 2.95.1] bigger stack with optimize
- To: Jean-Francois MOINE <d3moine at bst dot bsf dot alcatel dot fr>
- Subject: Re: [g++ 2.95.1] bigger stack with optimize
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Mon, 06 Dec 1999 11:27:00 +0100
- Cc: gcc-bugs at gcc dot gnu dot org,lasserre at col dot bsf dot alcatel dot fr,lparis at col dot bsf dot alcatel dot fr,vittone at col dot bsf dot alcatel dot fr,d3moine at bst dot bsf dot alcatel dot fr,hot_line at bsbeton dot bst dot bsf dot alcatel dot fr
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.