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: -fomit-frame-pointer interaction with alloca - egcs-1.0.1


  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


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