This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: builtin_return_addr vs frame_pointer_needed vs -O3
- To: DJ Delorie <dj at redhat dot com>
- Subject: Re: builtin_return_addr vs frame_pointer_needed vs -O3
- From: Richard Henderson <rth at redhat dot com>
- Date: Wed, 31 Jan 2001 18:23:47 -0800
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <200101312226.RAA29943@greed.delorie.com> <20010131170452.A13854@redhat.com> <200102010220.VAA32628@greed.delorie.com>
On Wed, Jan 31, 2001 at 09:20:57PM -0500, DJ Delorie wrote:
> > + /* In override_options, TARGET_OMIT_LEAF_FRAME_POINTER turns off
> > + the frame pointer by default. Turn it back on now if we've not
> > + got a leaf function. */
> > + if (TARGET_OMIT_LEAF_FRAME_POINTER && ! leaf_function_p ())
> > + return 1;
>
> Could you explain this one? I don't see how the non-leaf functions
> require a frame pointer only when you want leaf functions to not have
> one, but they don't require one otherwise.
As the comment says, see override_options.
In order to make -momit-leaf-frame-pointer work, we make the default
no frame pointer, then force a frame pointer for non-leaf functions.
r~