Determines whether EBP is used as a general-purpose register in optimizations.
Windows: Optimization > Omit Frame Pointers
Linux: Optimization > Provide Frame Pointer
Mac OS X: Optimization > Provide Frame Pointer
-f[no-]omit-frame-pointer: IA-32, Intel® 64 architectures
/Oy[-]: IA-32 architecture
Linux and Mac OS X: | -fomit-frame-pointer -fno-omit-frame-pointer |
Windows: | /Oy /Oy- |
None
-fomit-frame-pointer |
EBP is used as a general-purpose register in optimizations. However, on Linux* and Mac OS* X 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. |
These options determine whether EBP is used as a general-purpose register in optimizations. Options -fomit-frame-pointer and /Oy allow this use. Options -fno-omit-frame-pointer and /Oy- disallow 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 /Oy- options direct 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.
There is currently an issue with GCC 3.2 exception handling. Therefore, the Intel compiler ignores this option when GCC 3.2 is installed for C++ and exception handling is turned on (the default).
Copyright © 1996-2011, Intel Corporation. All rights reserved.