public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Re-enable -feliminate-unused-debug-types by default
@ 2011-04-02  9:08 Eric Botcazou
  2011-04-02 22:52 ` Gerald Pfeifer
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Botcazou @ 2011-04-02  9:08 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

The previous 7 patches paved the way to enabling -feliminate-unused-debug-types 
again by default in Ada.  We measured a 12.5% reduction in debug info size on 
one big application (and an even larger one for another application), as well 
as a 0.5% reduction in compilation time at -O0 -g.

Tested on i586-suse-linux, applied on the mainline.


2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
	* gcc-interface/misc.c (gnat_handle_option): Remove special handling
	code for -feliminate-unused-debug-types
	(gnat_post_options): Likewise.


-- 
Eric Botcazou

[-- Attachment #2: p.diff --]
[-- Type: text/x-diff, Size: 2626 bytes --]

Index: gcc-interface/lang.opt
===================================================================
--- gcc-interface/lang.opt	(revision 171818)
+++ gcc-interface/lang.opt	(working copy)
@@ -1,5 +1,5 @@
 ; Options for the Ada front end.
-; Copyright (C) 2003, 2007, 2008, 2010 Free Software Foundation, Inc.
+; Copyright (C) 2003, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
 ;
 ; This file is part of GCC.
 ;
@@ -94,12 +94,6 @@ nostdlib
 Ada
 ; Don't look for object files
 
-feliminate-unused-debug-types
-Ada
-; Effect documented for C - intercepted for Ada to force the associated flag
-; not to be set by default, as it currently eliminates unreferenced parallel
-; types we need for encoding descriptions to the debugger.
-
 fRTS=
 Ada Joined RejectNegative
 ; Selects the runtime
Index: gcc-interface/misc.c
===================================================================
--- gcc-interface/misc.c	(revision 171862)
+++ gcc-interface/misc.c	(working copy)
@@ -125,14 +125,6 @@ gnat_handle_option (size_t scode, const
       /* These are used in the GCC Makefile.  */
       break;
 
-    case OPT_feliminate_unused_debug_types:
-      /* We arrange for post_option to be able to only set the corresponding
-	 flag to 1 when explicitly requested by the user.  We expect the
-	 default flag value to be either 0 or positive, and expose a positive
-	 -f as a negative value to post_option.  */
-      flag_eliminate_unused_debug_types = -value;
-      break;
-
     case OPT_gant:
       warning (0, "%<-gnat%> misspelled as %<-gant%>");
 
@@ -232,8 +224,7 @@ enum stack_check_type flag_stack_check =
 static bool
 gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
 {
-  /* Excess precision other than "fast" requires front-end
-     support.  */
+  /* Excess precision other than "fast" requires front-end support.  */
   if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
       && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
     sorry ("-fexcess-precision=standard for Ada");
@@ -245,14 +236,6 @@ gnat_post_options (const char **pfilenam
   /* No psABI change warnings for Ada.  */
   warn_psabi = 0;
 
-  /* Force eliminate_unused_debug_types to 0 unless an explicit positive
-     -f has been passed.  This forces the default to 0 for Ada, which might
-     differ from the common default.  */
-  if (flag_eliminate_unused_debug_types < 0)
-    flag_eliminate_unused_debug_types = 1;
-  else
-    flag_eliminate_unused_debug_types = 0;
-
   optimize = global_options.x_optimize;
   optimize_size = global_options.x_optimize_size;
   flag_compare_debug = global_options.x_flag_compare_debug;

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

* Re: [Ada] Re-enable -feliminate-unused-debug-types by default
  2011-04-02  9:08 [Ada] Re-enable -feliminate-unused-debug-types by default Eric Botcazou
@ 2011-04-02 22:52 ` Gerald Pfeifer
  2011-04-03  9:03   ` Eric Botcazou
  0 siblings, 1 reply; 4+ messages in thread
From: Gerald Pfeifer @ 2011-04-02 22:52 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc-patches

On Sat, 2 Apr 2011, Eric Botcazou wrote:
> The previous 7 patches paved the way to enabling 
> -feliminate-unused-debug-types again by default in Ada.  We measured a 
> 12.5% reduction in debug info size on one big application (and an even 
> larger one for another application), as well as a 0.5% reduction in 
> compilation time at -O0 -g.

Nice.  I documented this for GCC 4.7 as follows.

Gerald

Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v
retrieving revision 1.4
diff -u -r1.4 changes.html
--- changes.html	27 Mar 2011 18:57:39 -0000	1.4
+++ changes.html	2 Apr 2011 22:50:50 -0000
@@ -46,6 +46,13 @@
 
 <h3>Ada</h3>
 
+  <ul>
+    <li>The command-line option <code>-feliminate-unused-debug-types</code>
+      has been removed.  Its behavior is the default now, leading to
+      a reduction in debug info size of 12% and more for relevant
+      cases.</li>
+  </ul>
+
 <h3>C family</h3>
 
 <h3>C++</h3>

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

* Re: [Ada] Re-enable -feliminate-unused-debug-types by default
  2011-04-02 22:52 ` Gerald Pfeifer
@ 2011-04-03  9:03   ` Eric Botcazou
  2011-04-03 22:41     ` Gerald Pfeifer
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Botcazou @ 2011-04-03  9:03 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: gcc-patches

> Nice.  I documented this for GCC 4.7 as follows.

Thanks.  However, "removed" is a bit of a misnomer since the option still 
exists in the compiler (the removal from gcc-interface/lang.opt is purely 
cosmetical).  Moreover, 12.5% is exactly 1/8.  So I'd suggest:

   <ul>
     <li>The command-line option <code>-feliminate-unused-debug-types</code>
-      has been removed.  Its behavior is the default now, leading to
-      a reduction in debug info size of 12% and more for relevant
-      cases.</li>
+      has been re-enabled by default, as it was for the other languages,
+      leading to a reduction in debug info size of 12.5% and more for
+      relevant cases, as well as to a small compilation speedup.</li>
   </ul>

-- 
Eric Botcazou

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

* Re: [Ada] Re-enable -feliminate-unused-debug-types by default
  2011-04-03  9:03   ` Eric Botcazou
@ 2011-04-03 22:41     ` Gerald Pfeifer
  0 siblings, 0 replies; 4+ messages in thread
From: Gerald Pfeifer @ 2011-04-03 22:41 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc-patches

On Sun, 3 Apr 2011, Eric Botcazou wrote:
> Thanks.  However, "removed" is a bit of a misnomer since the option still 
> exists in the compiler (the removal from gcc-interface/lang.opt is purely 
> cosmetical).  Moreover, 12.5% is exactly 1/8.  So I'd suggest:

Looks good.  And sorry for stealing that 0.5%. :-)

Gerald

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

end of thread, other threads:[~2011-04-03 22:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-02  9:08 [Ada] Re-enable -feliminate-unused-debug-types by default Eric Botcazou
2011-04-02 22:52 ` Gerald Pfeifer
2011-04-03  9:03   ` Eric Botcazou
2011-04-03 22:41     ` Gerald Pfeifer

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