Developer Guide and Reference

Contents

fomit-frame-pointer
, Oy

Determines whether EBP is used as a general-purpose register in optimizations.
Architecture Restrictions
Option
/Oy[-]
is only available on IA-32 architecture

Syntax

Linux:
-fomit-frame-pointer
-fno-omit-frame-pointer
macOS:
-fomit-frame-pointer
-fno-omit-frame-pointer
Windows:
/Oy
/Oy-
Arguments
None
Default
-fomit-frame-pointer
or
/Oy
EBP is used as a general-purpose register in optimizations. However, on Linux*
and
macOS*
systems, the default is
-fno-omit-frame-pointer
if option
-O0
or
-g
is specified.
On Windows* systems, the default is
/Oy-
if option
/Od
is specified.
Description
These options determine whether EBP is used as a general-purpose register in optimizations. Option
-fomit-frame-pointer
and option
/Oy
allows this use. Option
-fno-omit-frame-pointer
and option
/Oy-
disallows it.
Some debuggers expect EBP to be used as a stack frame pointer, and cannot produce a stack backtrace unless this is so. The
-fno-omit-frame-pointer
and the
/Oy-
option directs the compiler to generate code that maintains and uses EBP as a stack frame pointer for all functions so that a debugger can still produce a stack backtrace without doing the following:
  • For
    -fno-omit-frame-pointer
    : turning off optimizations with
    -O0
  • For
    /Oy-
    : turning off
    /O1
    ,
    /O2
    , or
    /O3
    optimizations
The
-fno-omit-frame-pointer
option is set when you specify option
-O0
or the
-g
option. The
-fomit-frame-pointer
option is set when you specify option
-O1
,
-O2
, or
-O3
.
The
/Oy
option is set when you specify the
/O1
,
/O2
, or
/O3
option. Option
/Oy-
is set when you specify the
/Od
option.
Using the
-fno-omit-frame-pointer
or
/Oy-
option reduces the number of available general-purpose registers by 1, and can result in slightly less efficient code.
For Linux* systems:
There is currently an issue with GCC 3.2 exception handling. Therefore, the compiler ignores this option when GCC 3.2 is installed for C++ and exception handling is turned on (the default).
Alternate Options
Linux
and
macOS*
:
-fp
(this is a deprecated option)
Windows: None

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804