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

2017-11-17 Thread Ramana Radhakrishnan
On 3 Nov 2017 16:55, "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
generic options so it works identically across all targets.  In many cases
the
target no longer needs to define TARGET_OPTION_OPTIMIZATION_TABLE, reducing
the amount of target code.

Verified all targets built by buildmanyglibcs script do still build.

OK for commit?


ChangeLog:
2017-11-03  Wilco Dijkstra  

* opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.





Err ...
 Doesn't this mean that targets that default to fno-omit-frame-poinyer need
to.continue to do so.?


Have you not changed the default on aarch64 without asking the maintainers
first for approval ?

Or am I missing something ?


Ramana

* common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_
TABLE):
Remove OPT_fomit_frame_pointer entry.
* common/config/arc/arc-common.c: Likewise.
* common/config/arm/arm-common.c: Likewise.
* common/config/avr/avr-common.c: Likewise.
* common/config/c6x/c6x-common.c: Likewise.
* common/config/cr16/cr16-common.c: Likewise.
* common/config/cris/cris-common.c: Likewise.
* common/config/epiphany/epiphany-common.c: Likewise.
* common/config/fr30/fr30-common.c: Likewise.
* common/config/frv/frv-common.c: Likewise.
* common/config/ia64/ia64-common.c: Likewise.
* common/config/iq2000/iq2000-common.c: Likewise.
* common/config/lm32/lm32-common.c: Likewise.
* common/config/m32r/m32r-common.c: Likewise.
* common/config/mcore/mcore-common.c: Likewise.
* common/config/microblaze/microblaze-common.c: Likewise.
* common/config/mips/mips-common.c: Likewise.
* common/config/mmix/mmix-common.c: Likewise.
* common/config/mn10300/mn10300-common.c: Likewise.
* common/config/nios2/nios2-common.c: Likewise.
* common/config/pa/pa-common.c: Likewise.
* common/config/pdp11/pdp11-common.c: Likewise.
* common/config/powerpcspe/powerpcspe-common.c: Likewise.
* common/config/riscv/riscv-common.c: Likewise.
* common/config/rs6000/rs6000-common.c: Likewise.
* common/config/rx/rx-common.c: Likewise.
* common/config/s390/s390-common.c: Likewise.
* common/config/sh/sh-common.c: Likewise.
* common/config/sparc/sparc-common.c: Likewise.
* common/config/tilegx/tilegx-common.c: Likewise.
* common/config/tilepro/tilepro-common.c: Likewise.
* common/config/v850/v850-common.c: Likewise.
* common/config/visium/visium-common.c: Likewise.
* common/config/xstormy16/xstormy16-common.c: Likewise.
* common/config/xtensa/xtensa-common.c: Likewise.

doc/
* invoke.texi (-fomit-frame-pointer): Update documentation.

--
diff --git a/gcc/common/config/alpha/alpha-common.c
b/gcc/common/config/alpha/alpha-common.c
index be42282270bbc22e31e39bfb5307d7b4d82a84b9..
3a7d28d16225478e2fdae42c5610e55dc0b68c6f 100644
--- a/gcc/common/config/alpha/alpha-common.c
+++ b/gcc/common/config/alpha/alpha-common.c
@@ -30,7 +30,6 @@ along with GCC; see the file COPYING3.  If not see
 /* Implement TARGET_OPTION_OPTIMIZATION_TABLE.  */
 static const struct default_options alpha_option_optimization_table[] =
   {
-{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
 /* Enable redundant extension instructions removal at -O2 and higher.
*/
 { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
 { OPT_LEVELS_NONE, 0, NULL, 0 }
diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-
common.c
index 82e0dd383c9d627d39cc8cf904ef3c17a80f3da9..
c437313ba4192b1d6c79b047b40b02e5b7a4facb 100644
--- a/gcc/common/config/arc/arc-common.c
+++ b/gcc/common/config/arc/arc-common.c
@@ -47,7 +47,6 @@ arc_option_init_struct (struct gcc_options *opts)
 static const struct default_options arc_option_optimization_table[] =
   {
 { OPT_LEVELS_SIZE, OPT_fsection_anchors, NULL, 1 },
-{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
 { OPT_LEVELS_ALL, OPT_mRcq, NULL, 1 },
 { OPT_LEVELS_ALL, OPT_mRcw, NULL, 1 },
 { OPT_LEVELS_ALL, OPT_msize_level_, NULL, 1 },
diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-
common.c
index 1588ca86e9b06282ed4358e072bc2b0224a11483..
5ae20fea916a636d078b9e1aa2b4e866b9da1259 100644
--- a/gcc/common/config/arm/arm-common.c
+++ b/gcc/common/config/arm/arm-common.c
@@ -36,7 +36,6 @@ static const struct default_options
arm_option_optimization_table[] =
   {
 /* Enable section anchors by default at -O1 or higher.  */
 { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 },
-{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
 { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
 { OPT_LEVELS_NONE, 0, NULL, 0 }
   

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

2017-11-15 Thread Sandra Loosemore

On 11/15/2017 10:38 AM, Wilco Dijkstra wrote:

Sandra Loosemore wrote:


I'd prefer that you remove the reference to configure options entirely
here.  Nowadays most GCC users install a package provided by their OS
distribution, Linaro, etc, rather than trying to build GCC from scratch.


OK, I've removed that reference. Similarly the FRAME_POINTER_REQUIRED
bit as that statement is not only irrelevant but also completely incorrect.


+Enabled at levels @option{-O}, @option{-O1}, @option{-O2}, @option{-O3},
+@option{-Os} and @option{-Og}.


This last sentence makes no sense.  If the option is now enabled by
default, then the optimization level is irrelevant.


It's enabled from -O onwards, so I've changed it to the standard form used
elsewhere and updated the table for -O:

+Enabled by default at @option{-O} and higher.

Here is the cleaned up and simplified version:

[snip]


Thanks, this patch is OK with me.

-Sandra


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

2017-11-15 Thread Wilco Dijkstra
Sandra Loosemore wrote:

> I'd prefer that you remove the reference to configure options entirely 
> here.  Nowadays most GCC users install a package provided by their OS 
> distribution, Linaro, etc, rather than trying to build GCC from scratch.

OK, I've removed that reference. Similarly the FRAME_POINTER_REQUIRED
bit as that statement is not only irrelevant but also completely incorrect.

> > +Enabled at levels @option{-O}, @option{-O1}, @option{-O2}, @option{-O3},
> > +@option{-Os} and @option{-Og}.
>
> This last sentence makes no sense.  If the option is now enabled by 
> default, then the optimization level is irrelevant.

It's enabled from -O onwards, so I've changed it to the standard form used
elsewhere and updated the table for -O:

+Enabled by default at @option{-O} and higher.

Here is the cleaned up and simplified version:


diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 
2ef88e081f982f5619132cc33ce23c3fb542ae11..158c9ae3f1297a1265fc974cd3e6825d8f5be096
 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7258,6 +7258,7 @@ compilation time.
 -fipa-reference @gol
 -fmerge-constants @gol
 -fmove-loop-invariants @gol
+-fomit-frame-pointer @gol
 -freorder-blocks @gol
 -fshrink-wrap @gol
 -fshrink-wrap-separate @gol
@@ -7282,9 +7283,6 @@ compilation time.
 -ftree-ter @gol
 -funit-at-a-time}
 
-@option{-O} also turns on @option{-fomit-frame-pointer} on machines
-where doing so does not interfere with debugging.
-
 @item -O2
 @opindex O2
 Optimize even more.  GCC performs nearly all supported optimizations
@@ -7436,29 +7434,18 @@ The default is @option{-ffp-contract=fast}.
 
 @item -fomit-frame-pointer
 @opindex fomit-frame-pointer
-Don't keep the frame pointer in a register for functions that
-don't need one.  This avoids the instructions to save, set up and
-restore frame pointers; it also makes an extra register available
-in many functions.  @strong{It also makes debugging impossible on
-some machines.}
-
-On some machines, such as the VAX, this flag has no effect, because
-the standard calling sequence automatically handles the frame pointer
-and nothing is saved by pretending it doesn't exist.  The
-machine-description macro @code{FRAME_POINTER_REQUIRED} controls
-whether a target machine supports this flag.  @xref{Registers,,Register
-Usage, gccint, GNU Compiler Collection (GCC) Internals}.
-
-The default setting (when not optimizing for
-size) for 32-bit GNU/Linux x86 and 32-bit Darwin x86 targets is
-@option{-fomit-frame-pointer}.  You can configure GCC with the
-@option{--enable-frame-pointer} configure option to change the default.
-
-Note that @option{-fno-omit-frame-pointer} doesn't force a new stack
-frame for all functions if it isn't otherwise needed, and hence doesn't
-guarantee a new frame pointer for all functions.
+Omit the frame pointer in functions that don't need one.  This avoids the
+instructions to save, set up and restore the frame pointer; on many targets
+it also makes an extra register available.
 
-Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
+On some targets this flag has no effect because the standard calling sequence
+always uses a frame pointer, so it cannot be omitted.
+
+Note that @option{-fno-omit-frame-pointer} doesn't guarantee the frame pointer
+is used in all functions.  Several targets always omit the frame pointer in
+leaf functions.
+
+Enabled by default at @option{-O} and higher.
 
 @item -foptimize-sibling-calls
 @opindex foptimize-sibling-calls
@@ -16753,9 +16740,7 @@ Certain other options, such as 
@option{-mid-shared-library} and
 @opindex momit-leaf-frame-pointer
 Don't keep the frame pointer in a register for leaf functions.  This
 avoids the instructions to save, set up and restore frame pointers and
-makes an extra register available in leaf functions.  The option
-@option{-fomit-frame-pointer} removes the frame pointer for all functions,
-which might make debugging harder.
+makes an extra register available in leaf functions.
 
 @item -mspecld-anomaly
 @opindex mspecld-anomaly


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

2017-11-10 Thread James Bowman
Andreas Schwab wrote:
>> 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).
>
>For m68k, adding -fomit-frame-pointer by default is ok.

For ft32, adding -fomit-frame-pointer by default is ok.

James.


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

2017-11-08 Thread Jeff Law
On 11/08/2017 11:16 AM, Wilco Dijkstra wrote:
> Jeff Law wrote:
> 
>> I'd actually prefer to deprecate the H8 and M68k.  But assuming that's
>> not going to happen in the immediate future I think dropping frame
>> pointers on those targets is appropriate as long as we're generating
>> dwarf frame info.
> 
> Is there a way to check a target does not generate dwarf? I thought that
> was the default.
Hmm, looks like H8 is ELF only at this point and unconditionally turns
on dwarf2 debug records and has bits to enable dwarf2 CFI records.

I suspect -gstabs would likely turn all that off, but well, the more I
think about it, I don't care :-)


> 
>>> 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.
>> I've had the "pleasure" of going round and round on this repeatedly
>> through the years with the kernel teams on this.  Essentially they
>> didn't want to embed the dwarf2 unwinder in the kernel or have all those
>> pages of unwind data.  Instead they strongly preferred to have a frame
>> pointer to facilitate easy and fast unwinding.
> 
> A frame pointer does not facilitate unwinding, it can give a backtrace at 
> best.
Sorry.  I was being imprecise in my choice of words.   A backtrace is
what the kernel guys need for various reasons.  In some cases the
backtrace is generated at interrupt time (handling of profiling events),
so it can't depend on the dwarf interpreter or the dwarf tables.

>> So  my concern is to make sure the kernel folks, particularly in the
>> ia32 world aren't going to get hosed by this change.  If we're changing
>> the default it needs to be signaled to them so that they can ensure that
>> if they want frame pointers that they still get them.
> 
> x86/x64 is not affected since it already omits the frame pointer by default 
> (like
> almost all targets in a target specific way). This patch is about making that
> the global default precisely because pretty much every target already has it
> as the default.
Yea, I guess we fixed 32bit x86 eons ago.

So I think the final conclusion is to go with your change.  If there's
any fallout on h8 or m68k we'll deal with it.

Jeff


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

2017-11-08 Thread Andreas Schwab
On Nov 08 2017, Wilco Dijkstra  wrote:

> 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).

For m68k, adding -fomit-frame-pointer by default is ok.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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

2017-11-08 Thread Wilco Dijkstra
Jeff Law wrote:

> I'd actually prefer to deprecate the H8 and M68k.  But assuming that's
> not going to happen in the immediate future I think dropping frame
> pointers on those targets is appropriate as long as we're generating
> dwarf frame info.

Is there a way to check a target does not generate dwarf? I thought that
was the default.

> > 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.
> I've had the "pleasure" of going round and round on this repeatedly
> through the years with the kernel teams on this.  Essentially they
> didn't want to embed the dwarf2 unwinder in the kernel or have all those
> pages of unwind data.  Instead they strongly preferred to have a frame
> pointer to facilitate easy and fast unwinding.

A frame pointer does not facilitate unwinding, it can give a backtrace at best.

But indeed, frame pointers, unwinding and stack chains are often confused
despite being completely orthogonal concepts...

> So  my concern is to make sure the kernel folks, particularly in the
> ia32 world aren't going to get hosed by this change.  If we're changing
> the default it needs to be signaled to them so that they can ensure that
> if they want frame pointers that they still get them.

x86/x64 is not affected since it already omits the frame pointer by default 
(like
almost all targets in a target specific way). This patch is about making that
the global default precisely because pretty much every target already has it
as the default.

Wilco

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

2017-11-08 Thread Jeff Law
On 11/08/2017 10:47 AM, Wilco Dijkstra wrote:
> 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).
Which means it's probably myself or Alex for the H8 :(  Some things you
can never manage to get rid of.

I'd actually prefer to deprecate the H8 and M68k.  But assuming that's
not going to happen in the immediate future I think dropping frame
pointers on those targets is appropriate as long as we're generating
dwarf frame info.

For deeply embedded targets that don't want the overhead of dwarf, well,
IMHO, they can add -fno-omit-frame-pointer explicitly :-)


> 
>> 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.
I've had the "pleasure" of going round and round on this repeatedly
through the years with the kernel teams on this.  Essentially they
didn't want to embed the dwarf2 unwinder in the kernel or have all those
pages of unwind data.  Instead they strongly preferred to have a frame
pointer to facilitate easy and fast unwinding.

So  my concern is to make sure the kernel folks, particularly in the
ia32 world aren't going to get hosed by this change.  If we're changing
the default it needs to be signaled to them so that they can ensure that
if they want frame pointers that they still get them.

jeff



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

2017-11-08 Thread Wilco Dijkstra
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


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

2017-11-03 Thread Sandra Loosemore

On 11/03/2017 10:54 AM, Wilco Dijkstra wrote:

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 
71b2445f70fd5b832c68c08e69e71d8ecad37a4a..1c56f4b12495fe97c604200ef245c9fa02684b0f
 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7436,16 +7436,17 @@ machine-description macro @code{FRAME_POINTER_REQUIRED} 
controls
  whether a target machine supports this flag.  @xref{Registers,,Register
  Usage, gccint, GNU Compiler Collection (GCC) Internals}.

-The default setting (when not optimizing for
-size) for 32-bit GNU/Linux x86 and 32-bit Darwin x86 targets is
-@option{-fomit-frame-pointer}.  You can configure GCC with the
-@option{--enable-frame-pointer} configure option to change the default.
+The default setting is @option{-fomit-frame-pointer}.  You can configure GCC
+with the @option{--enable-frame-pointer} configure option to change the 
default.


I'd prefer that you remove the reference to configure options entirely 
here.  Nowadays most GCC users install a package provided by their OS 
distribution, Linaro, etc, rather than trying to build GCC from scratch.



  Note that @option{-fno-omit-frame-pointer} doesn't force a new stack
  frame for all functions if it isn't otherwise needed, and hence doesn't
-guarantee a new frame pointer for all functions.
+guarantee a new frame pointer for all functions.  Several targets always omit
+the frame pointer in leaf functions.
+
+Enabled at levels @option{-O}, @option{-O1}, @option{-O2}, @option{-O3},
+@option{-Os} and @option{-Og}.


This last sentence makes no sense.  If the option is now enabled by 
default, then the optimization level is irrelevant.


-Sandra



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

2017-11-03 Thread Joseph Myers
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 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.

-- 
Joseph S. Myers
jos...@codesourcery.com


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

2017-11-03 Thread Wilco Dijkstra
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
generic options so it works identically across all targets.  In many cases the
target no longer needs to define TARGET_OPTION_OPTIMIZATION_TABLE, reducing
the amount of target code.

Verified all targets built by buildmanyglibcs script do still build.

OK for commit?


ChangeLog:
2017-11-03  Wilco Dijkstra  

* opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
* common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
Remove OPT_fomit_frame_pointer entry.
* common/config/arc/arc-common.c: Likewise. 
* common/config/arm/arm-common.c: Likewise. 
* common/config/avr/avr-common.c: Likewise. 
* common/config/c6x/c6x-common.c: Likewise. 
* common/config/cr16/cr16-common.c: Likewise.   
* common/config/cris/cris-common.c: Likewise.   
* common/config/epiphany/epiphany-common.c: Likewise.   
* common/config/fr30/fr30-common.c: Likewise.   
* common/config/frv/frv-common.c: Likewise. 
* common/config/ia64/ia64-common.c: Likewise.   
* common/config/iq2000/iq2000-common.c: Likewise.   
* common/config/lm32/lm32-common.c: Likewise.   
* common/config/m32r/m32r-common.c: Likewise.   
* common/config/mcore/mcore-common.c: Likewise. 
* common/config/microblaze/microblaze-common.c: Likewise.   
* common/config/mips/mips-common.c: Likewise.   
* common/config/mmix/mmix-common.c: Likewise.   
* common/config/mn10300/mn10300-common.c: Likewise.
* common/config/nios2/nios2-common.c: Likewise. 
* common/config/pa/pa-common.c: Likewise.   
* common/config/pdp11/pdp11-common.c: Likewise. 
* common/config/powerpcspe/powerpcspe-common.c: Likewise.   
* common/config/riscv/riscv-common.c: Likewise. 
* common/config/rs6000/rs6000-common.c: Likewise.   
* common/config/rx/rx-common.c: Likewise.   
* common/config/s390/s390-common.c: Likewise.   
* common/config/sh/sh-common.c: Likewise.   
* common/config/sparc/sparc-common.c: Likewise. 
* common/config/tilegx/tilegx-common.c: Likewise.   
* common/config/tilepro/tilepro-common.c: Likewise. 
* common/config/v850/v850-common.c: Likewise.   
* common/config/visium/visium-common.c: Likewise.   
* common/config/xstormy16/xstormy16-common.c: Likewise. 
* common/config/xtensa/xtensa-common.c: Likewise.

doc/
* invoke.texi (-fomit-frame-pointer): Update documentation.

--
diff --git a/gcc/common/config/alpha/alpha-common.c 
b/gcc/common/config/alpha/alpha-common.c
index 
be42282270bbc22e31e39bfb5307d7b4d82a84b9..3a7d28d16225478e2fdae42c5610e55dc0b68c6f
 100644
--- a/gcc/common/config/alpha/alpha-common.c
+++ b/gcc/common/config/alpha/alpha-common.c
@@ -30,7 +30,6 @@ along with GCC; see the file COPYING3.  If not see
 /* Implement TARGET_OPTION_OPTIMIZATION_TABLE.  */
 static const struct default_options alpha_option_optimization_table[] =
   {
-{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
 /* Enable redundant extension instructions removal at -O2 and higher.  */
 { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
 { OPT_LEVELS_NONE, 0, NULL, 0 }
diff --git a/gcc/common/config/arc/arc-common.c 
b/gcc/common/config/arc/arc-common.c
index 
82e0dd383c9d627d39cc8cf904ef3c17a80f3da9..c437313ba4192b1d6c79b047b40b02e5b7a4facb
 100644
--- a/gcc/common/config/arc/arc-common.c
+++ b/gcc/common/config/arc/arc-common.c
@@ -47,7 +47,6 @@ arc_option_init_struct (struct gcc_options *opts)
 static const struct default_options arc_option_optimization_table[] =
   {
 { OPT_LEVELS_SIZE, OPT_fsection_anchors, NULL, 1 },
-{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
 { OPT_LEVELS_ALL, OPT_mRcq, NULL, 1 },
 { OPT_LEVELS_ALL, OPT_mRcw, NULL, 1 },
 { OPT_LEVELS_ALL, OPT_msize_level_, NULL, 1 },
diff --git a/gcc/common/config/arm/arm-common.c 
b/gcc/common/config/arm/arm-common.c
index 
1588ca86e9b06282ed4358e072bc2b0224a11483..5ae20fea916a636d078b9e1aa2b4e866b9da1259
 100644
--- a/gcc/common/config/arm/arm-common.c
+++ b/gcc/common/config/arm/arm-common.c
@@ -36,7 +36,6 @@ static const struct default_options 
arm_option_optimization_table[] =
   {
 /* Enable section anchors by default at -O1 or higher.  */
 { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 },
-{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
 { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
 { OPT_LEVELS_NONE, 0, NULL, 0 }
   };
diff --git a/gcc/common/config/avr/avr-common.c 
b/gcc/common/config/avr/avr-common.c
index