This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -fomit-frame-pointer interaction with alloca - egcs-1.0.1
- To: John Hughes <john at AtlanTech dot COM>
- Subject: Re: -fomit-frame-pointer interaction with alloca - egcs-1.0.1
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 09 Feb 1998 12:52:00 -0700
- cc: "Egcs-Bugs Mailing List (E-mail)" <egcs-bugs at cygnus dot com>
- Reply-To: law at cygnus dot com
In message <01BD3588.B361D700@malvinas.AtlanTech.COM>you write:
> Jeff writes:
> Jeff> Thanks for the testcase.
>
> Well, here's another. (I patched my egcs to fix the sp update on exit).
>
> Looks like conditional expressions can force unneccesary sp updates:
>
> int dbdir_sort_date (int first_private, int second_private) {
> char * name = alloca (( 256 ) + 1) ;
> fred (name);
> return first_private < second_private ? -1 : 0 ;
> }
I suspect this happens because we initially generate compare/jump sequences
(which must do the sp adjustments). Then we optimize the compare/jump
sequences into a conditional move during the first jump optimization pass.
The obvious solution is to move the conditional move support earlier in
the compiler.... If that is indeed the problem.
jeff