This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Set default to -fomit-frame-pointer


Joseph Myers wrote:
> On Fri, 3 Nov 2017, Wilco Dijkstra wrote:
>
> > Almost all targets add an explict -fomit-frame-pointer in the target specific
> > options.  Rather than doing this in a target-specific way, do this in the
>
> Which targets do not?  You should explicitly list them and CC their 
> maintainers and seek confirmation that such a change is appropriate for 
> them.

The targets that don't explicitly enable -fomit-frame-pointer in the target
options or force it internally are bfin, ft32, h8300, m68k - I've CCd the
maintainers (it seems there is no-one for h8300).

> The addition of -fomit-frame-pointer through this mechanism was a 
> replacement for the old target macro CAN_DEBUG_WITHOUT_FP.  It may now be 
> the cases that with DWARF debug info, having or not having a frame pointer 
> is not particularly relevant to debugging.  But since there are other 
> reasons people may want a frame pointer (e.g. light-weight backtraces that 
> don't depend on debug / unwind info), it's at least possible there are 
> architecture-specific choices regarding keeping frame pointers involved 
> here.

I believe in those cases targets already force the frame pointer as required,
for example msp430 sets the frame pointer if unwind tables are emitted
irrespectively of the command-line or default setting. Various other targets
don't even use frame_pointer_needed and just do their own thing.

Wilco


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]