From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5993 invoked by alias); 2 Apr 2011 09:08:53 -0000 Received: (qmail 5982 invoked by uid 22791); 2 Apr 2011 09:08:52 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Apr 2011 09:08:48 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 6119ACB023E for ; Sat, 2 Apr 2011 11:08:47 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dhodQReFvRGq for ; Sat, 2 Apr 2011 11:08:44 +0200 (CEST) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 54E3ACB0238 for ; Sat, 2 Apr 2011 11:08:44 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Re-enable -feliminate-unused-debug-types by default Date: Sat, 02 Apr 2011 09:08:00 -0000 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_udulNMqBiRcjr28" Message-Id: <201104021107.58566.ebotcazou@adacore.com> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00123.txt.bz2 --Boundary-00=_udulNMqBiRcjr28 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 627 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 * 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 --Boundary-00=_udulNMqBiRcjr28 Content-Type: text/x-diff; charset="iso 8859-15"; name="p.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p.diff" Content-length: 2626 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; --Boundary-00=_udulNMqBiRcjr28--