This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: builtin_return_addr vs frame_pointer_needed vs -O3
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~