> PING^1
> 
> On 1/3/20 12:23 PM, Martin Liška wrote:
> > Hi.
> > 
> > I'm not fully sure about the change, but -momit-leaf-frame-pointer
> > probably should not globally omit frame pointers?
> > 
> > Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> > 
> > Ready to be installed?
> > Thanks,
> > Martin
> > 
> > gcc/ChangeLog:
> > 
> > 2020-01-03  Martin Liska  <mli...@suse.cz>
> > 
> >      PR tree-optimization/92860
> >      * config/i386/i386-options.c (ix86_option_override_internal):
> >      Do not enable -fomit-frame-pointer with -momit-leaf-frame-pointer
> >      as it will globally omit pointers (like in ira.c).

Does gcc omit frame pointer of leaf functions after your change?
My recollection how this code works is that flag_omit_frame_pointer is
needed for regalloc to consider omitting at first plce and then it
queries frame_pointer_required hook wihch if only
-momit-leaf-frame-pointer is used will return true for all non-leaf
functions so effectivly only leaf ones are omitted.

If you stop setting the flag I think IRA will not consider omitting at
all and whole flag will become noop.

Honza

Reply via email to