This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to omit the frame pointer from leaf functions
- To: amylaar at cygnus dot co dot uk
- Subject: Re: patch to omit the frame pointer from leaf functions
- From: John Wehle <john at feith dot com>
- Date: Mon, 21 Sep 1998 14:03:53 -0400 (EDT)
- Cc: egcs-patches at cygnus dot com
> Yes. Without a fame pointer, debugging is usually impossible.
> On those targets where it is possible, you can set CAN_DEBUG_WITHOUT_FP and
> gcc will default to -fomit-frame-pointer when optimizing.
I believe that -fomit-frame-pointer is sometimes a performance loss on
non-leaf functions. It's true that debugging becomes more difficult,
which is why my change only takes effect if optimize is not zero.
Perhaps it should only take effect if optimize >= 2.
Actually what I'm wondering is if there's ever a performance loss when
omitting the frame pointer in a leaf function. On the i386 Intel
recommends always omitting the frame pointer in leaf functions.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------