public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* x86 omit leaf frame pointer (was Re: egcs-1.2 stuff)
@ 1999-03-19 17:29 John Wehle
  1999-03-31 23:46 ` John Wehle
  0 siblings, 1 reply; 2+ messages in thread
From: John Wehle @ 1999-03-19 17:29 UTC (permalink / raw)
  To: amylaar; +Cc: egcs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* x86 omit leaf frame pointer (was Re: egcs-1.2 stuff)
  1999-03-19 17:29 x86 omit leaf frame pointer (was Re: egcs-1.2 stuff) John Wehle
@ 1999-03-31 23:46 ` John Wehle
  0 siblings, 0 replies; 2+ messages in thread
From: John Wehle @ 1999-03-31 23:46 UTC (permalink / raw)
  To: amylaar; +Cc: egcs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-03-31 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-19 17:29 x86 omit leaf frame pointer (was Re: egcs-1.2 stuff) John Wehle
1999-03-31 23:46 ` John Wehle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).