egcs-2.93.22 creates spurious local variables

Jeffrey A Law law@upchuck.cygnus.com
Mon May 31 21:06:00 GMT 1999


  In message < 199905211350.JAA00719@sleipnir.valparaiso.cl >you write:
  > ------- =_aaaaaaaaaa0
  > Content-Type: text/plain; charset="us-ascii"
  > Content-ID: <714.927294527.1@sleipnir.valparaiso.cl>
  > 
  > This is linux on i586.
  > 
  > The following tiny program has egcs-2.93.{19,20,21,22} creating 12 bytes of
  > space for completely unused variables on the stack. egcs-1.1.2 doesn't. The
  >  
  > program and assembler outputs follow. I have no earlier snapshots at hand,
  > so this could be an old problem.
  > 
  > I consider this a performance regression, as there are cases where stack
  > space is scarce (i.e., the Linux kernel has a very limited stack!)
  > 
  > The files below where compiled with -O2 -fomit-frame-pointer.
It's due to the code to try and keep the stack pointer aligned I suspect.

If you're concerned about stack usage, then use -mpreferred-stack-boundary=n
to disable this stuff.

jeff



More information about the Gcc-bugs mailing list