This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to improve i386 epilogue (version 5)
- To: John Wehle <john at feith dot com>
- Subject: Re: patch to improve i386 epilogue (version 5)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 09 Oct 1998 18:26:19 -0600
- cc: rth at cygnus dot com, egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199810091947.PAA16557@jwlab.FEITH.COM>you write:
> > Am I missing something, or are you working way too hard for this?
> >
> > /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function
> ,
> > the stack pointer does not matter. The value is tested only in
> > functions that have frame pointers.
> > No definition is equivalent to always zero. */
> > /* Note on the 386 it might be more efficient not to define this since
> > we have to restore it ourselves from the frame pointer, in order to
> > use pop */
> >
> > #define EXIT_IGNORE_STACK 1
>
> I belive that not defining EXIT_IGNORE_STACK disables some useful
> optimizations. The idea is to let gcc do these optimizations
> and to simply notice when they haven't been done which means that
> the stack pointer doesn't need to be reloaded.
Correct.
EXIT_IGNORE_STACK allows the compiler to delete insns which pop args off the
stack if control will be passing to the end of the function. In fact, it is
precisely this optimization which prevents us from using the stack pointer
in the epilogue to begin with.
jeff