patch to omit the frame pointer from leaf functions
John Wehle
john@feith.com
Mon Sep 21 00:00:00 GMT 1998
This change allows gcc to omit the frame pointer when optimizing
leaf functions which don't call alloca. Are the situations where
having a frame pointer in a leaf function is a win (assuming that
the machine description doesn't require it)?
Notes:
1) The earlier patch which improves the accuracy of function_call_count
should be installed prior to this.
ChangeLog:
Mon Sep 21 01:38:35 EDT 1998 John Wehle (john@feith.com)
* reload1.c (reload): Don't set frame_pointer_needed when
optimizing leaf functions.
Enjoy!
-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/reload1.c.ORIGINAL Thu Sep 17 22:59:26 1998
--- gcc/reload1.c Mon Sep 21 01:33:32 1998
*************** reload (first, global, dumpfile)
*** 750,756 ****
/* Does this function require a frame pointer? */
! frame_pointer_needed = (! flag_omit_frame_pointer
#ifdef EXIT_IGNORE_STACK
/* ?? If EXIT_IGNORE_STACK is set, we will not save
and restore sp for alloca. So we can't eliminate
--- 750,758 ----
/* Does this function require a frame pointer? */
! frame_pointer_needed = ((! flag_omit_frame_pointer
! && (! optimize || function_call_count != 0
! || current_function_calls_alloca))
#ifdef EXIT_IGNORE_STACK
/* ?? If EXIT_IGNORE_STACK is set, we will not save
and restore sp for alloca. So we can't eliminate
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------
More information about the Gcc-patches
mailing list