From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Wehle To: amylaar@cygnus.co.uk Cc: egcs@egcs.cygnus.com Subject: x86 omit leaf frame pointer (was Re: egcs-1.2 stuff) Date: Fri, 19 Mar 1999 17:29:00 -0000 Message-id: <199903200128.UAA01808@jwlab.FEITH.COM> X-SW-Source: 1999-03/msg00680.html >> Tue Nov 3 23:01:34 EST 1998 John Wehle (john@feith.com) >> >> * i386.h (MASK_OMIT_LEAF_FRAME_POINTER): Use octal for consistency. >> (TARGET_SWITCHES): Omit leaf frame pointer by default. >> (FRAME_POINTER_REQUIRED): Use current_function_sp_is_unchanging >> instead of leaf_function_p. >> * i386.c (override_options): Have flag_omit_frame_pointer >> override TARGET_OMIT_LEAF_FRAME_POINTER. > >IMHO this is bogus. > We already have the tm.h macro CAN_DEBUG_WITHOUT_FP. Which isn't true for the x86. In general functions without a frame pointer can't be debugged. I contributed support for debugging functions where the stack pointer is unchanging (i.e. leaf functions). > Is there any reason not to use it? Yes. See above. > Even if for some reason it can't be made to work, the place for optimization > options is OPTIMIZATION_OPTIONS. OVERRIDE_OPTIONS has a different purpose. OVERRIDE_OPTIONS is documented as handling interactions between options. It is used to ensure that a sane set of options are in effect. Currently (on the x86) it ensures that flag_omit_frame_pointer is set if TARGET_OMIT_LEAF_FRAME_POINTER is set (the combination of flag_omit_frame_pointer == 0 && TARGET_OMIT_LEAF_FRAME_POINTER == 1 is invalid). My change merely notes that TARGET_OMIT_LEAF_FRAME_POINTER shouldn't be set if -fomit-frame-pointer was given on the command line. This use of OVERRIDE_OPTIONS seems consistent with the documentation. On a different note ... it probably makes more sense to set TARGET_OMIT_LEAF_FRAME_POINTER in OPTIMIZATION_OPTIONS instead of changing TARGET_SWITCHES in i386.h -- John ------------------------------------------------------------------------- | Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com | | John Wehle | Fax: 1-215-540-5495 | | ------------------------------------------------------------------------- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Wehle To: amylaar@cygnus.co.uk Cc: egcs@egcs.cygnus.com Subject: x86 omit leaf frame pointer (was Re: egcs-1.2 stuff) Date: Wed, 31 Mar 1999 23:46:00 -0000 Message-ID: <199903200128.UAA01808@jwlab.FEITH.COM> X-SW-Source: 1999-03n/msg00685.html Message-ID: <19990331234600.JSgepR-upUB6YObtbitUKaMXzr93yVX8kouET6NxvZ4@z> >> Tue Nov 3 23:01:34 EST 1998 John Wehle (john@feith.com) >> >> * i386.h (MASK_OMIT_LEAF_FRAME_POINTER): Use octal for consistency. >> (TARGET_SWITCHES): Omit leaf frame pointer by default. >> (FRAME_POINTER_REQUIRED): Use current_function_sp_is_unchanging >> instead of leaf_function_p. >> * i386.c (override_options): Have flag_omit_frame_pointer >> override TARGET_OMIT_LEAF_FRAME_POINTER. > >IMHO this is bogus. > We already have the tm.h macro CAN_DEBUG_WITHOUT_FP. Which isn't true for the x86. In general functions without a frame pointer can't be debugged. I contributed support for debugging functions where the stack pointer is unchanging (i.e. leaf functions). > Is there any reason not to use it? Yes. See above. > Even if for some reason it can't be made to work, the place for optimization > options is OPTIMIZATION_OPTIONS. OVERRIDE_OPTIONS has a different purpose. OVERRIDE_OPTIONS is documented as handling interactions between options. It is used to ensure that a sane set of options are in effect. Currently (on the x86) it ensures that flag_omit_frame_pointer is set if TARGET_OMIT_LEAF_FRAME_POINTER is set (the combination of flag_omit_frame_pointer == 0 && TARGET_OMIT_LEAF_FRAME_POINTER == 1 is invalid). My change merely notes that TARGET_OMIT_LEAF_FRAME_POINTER shouldn't be set if -fomit-frame-pointer was given on the command line. This use of OVERRIDE_OPTIONS seems consistent with the documentation. On a different note ... it probably makes more sense to set TARGET_OMIT_LEAF_FRAME_POINTER in OPTIMIZATION_OPTIONS instead of changing TARGET_SWITCHES in i386.h -- John ------------------------------------------------------------------------- | Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com | | John Wehle | Fax: 1-215-540-5495 | | -------------------------------------------------------------------------