public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR 16373: -fomit-frame-pointer when optimizing on x86
@ 2004-07-12  0:54 Roger Sayle
  2004-07-12  1:43 ` Joseph S. Myers
  2004-07-12  7:07 ` Jakub Jelinek
  0 siblings, 2 replies; 28+ messages in thread
From: Roger Sayle @ 2004-07-12  0:54 UTC (permalink / raw)
  To: gcc-patches


I was orginally just going to ask whether there were any remaining
hold-ups to enabling -fomit-frame-pointer by default when optimizing
on IA-32.  More pro-actively, I thought I'd propose the following patch
and see what people think.  The x86_64 targets in i386.c already do
this by default, and with the variable tracking changes, gcc 3.5 will
already require users to use a recent gdb 6.x for debugging.


The following patch has been tested on i686-pc-linux-gnu with a full
"make bootstrap", all default languages, and regression tested with a
top-level "make -k check" with no new failures.  I'll admit that I've
never run the gdb testsuite, but I'd hope that by now any regressions
there would be considered problems with gdb :)

Ok for mainline?



2004-07-11  Roger Sayle  <roger@eyesopen.com>

	PR middle-end/16373
	* config/i386/i386.h (CAN_DEBUG_WITHOUT_FP): Define.
	* config/i386/i386.c (optimization_options): Don't track
	whether flag_omit_frame_pointer has been specified by user.
	(override_options): Don't adjust target dependent default for
	flag_omit_frame_pointer.


Index: i386.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.388
diff -c -3 -p -r1.388 i386.h
*** i386.h	7 Jul 2004 19:24:17 -0000	1.388
--- i386.h	11 Jul 2004 19:53:17 -0000
*************** struct machine_function GTY(())
*** 3119,3124 ****
--- 3119,3127 ----
  #define X86_FILE_START_VERSION_DIRECTIVE false
  #define X86_FILE_START_FLTUSED false

+ /* Show we can debug even without a frame pointer.  */
+ #define CAN_DEBUG_WITHOUT_FP
+
  /*
  Local variables:
  version-control: t
Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.689
diff -c -3 -p -r1.689 i386.c
*** i386.c	10 Jul 2004 19:01:40 -0000	1.689
--- i386.c	11 Jul 2004 19:53:20 -0000
*************** override_options (void)
*** 1199,1206 ****
       in case they weren't overwritten by command line options.  */
    if (TARGET_64BIT)
      {
-       if (flag_omit_frame_pointer == 2)
- 	flag_omit_frame_pointer = 1;
        if (flag_asynchronous_unwind_tables == 2)
  	flag_asynchronous_unwind_tables = 1;
        if (flag_pcc_struct_return == 2)
--- 1199,1204 ----
*************** override_options (void)
*** 1208,1215 ****
      }
    else
      {
-       if (flag_omit_frame_pointer == 2)
- 	flag_omit_frame_pointer = 0;
        if (flag_asynchronous_unwind_tables == 2)
  	flag_asynchronous_unwind_tables = 0;
        if (flag_pcc_struct_return == 2)
--- 1206,1211 ----
*************** optimization_options (int level, int siz
*** 1578,1585 ****
       that is not known at this moment.  Mark these values with 2 and
       let user the to override these.  In case there is no command line option
       specifying them, we will set the defaults in override_options.  */
-   if (optimize >= 1)
-     flag_omit_frame_pointer = 2;
    flag_pcc_struct_return = 2;
    flag_asynchronous_unwind_tables = 2;
  }
--- 1574,1579 ----


Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833

^ permalink raw reply	[flat|nested] 28+ messages in thread
[parent not found: <Pine.LNX.4.44.0407111933390.11880-100000@nondot.org>]

end of thread, other threads:[~2004-07-16 20:35 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-12  0:54 [PATCH] PR 16373: -fomit-frame-pointer when optimizing on x86 Roger Sayle
2004-07-12  1:43 ` Joseph S. Myers
2004-07-12  2:19   ` Roger Sayle
2004-07-12  7:07 ` Jakub Jelinek
2004-07-12  8:18   ` Roger Sayle
2004-07-12  8:28     ` Andrew Pinski
2004-07-12  8:38       ` Michael Matz
2004-07-12 12:42     ` Jakub Jelinek
2004-07-12 18:03       ` Florian Weimer
2004-07-12 18:06         ` Paolo Bonzini
2004-07-12 18:19           ` Paolo Bonzini
2004-07-12 19:06           ` Florian Weimer
2004-07-12 19:07           ` Giovanni Bajo
2004-07-12 19:24             ` Jakub Jelinek
2004-07-12 19:31             ` Paolo Bonzini
2004-07-12 19:09         ` Jakub Jelinek
2004-07-12 23:43   ` Richard Henderson
2004-07-15 14:44     ` Roger Sayle
2004-07-15 14:54       ` Richard Henderson
2004-07-15 15:07         ` Roger Sayle
2004-07-15 16:04           ` Richard Henderson
2004-07-16 20:36             ` Roger Sayle
2004-07-16 21:12               ` Zack Weinberg
2004-07-17  0:41                 ` Roger Sayle
2004-07-16 22:34               ` Richard Henderson
2004-07-16 23:27                 ` Geert Bosch
2004-07-16 23:28                 ` Roger Sayle
     [not found] <Pine.LNX.4.44.0407111933390.11880-100000@nondot.org>
2004-07-12  3:11 ` Roger Sayle

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