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]

Re: patch to omit the frame pointer from leaf functions


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



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