From patchwork Fri Jan 15 10:02:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 567993 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D130D140BFA for ; Fri, 15 Jan 2016 21:03:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=kpzjRBT5; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=xVqivKtoD/nWEHCQnmI7TNwH/H5NewvXQeiQTtp9AreIepcN8No3d Fw94+Daw9u2DE4OtAlVjq6aVgLcvIhIuMIGpcsSbuC05imUM0XqMJmjw7x/O5pDV hSjt6OgXxtxCC6tGqESIMlqQD3jvbk0xZnGhPV4detGMYZjMsXwSkQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=jaRgQAgDdr8qPTKILenNFWghIz8=; b=kpzjRBT598gXnLvMIyRE zXTC2riqALFIbDxgJnaa6kpd0MREeejRgb2vYukA5AZVdgOIVQdS7+WZHY9EGCgF SrzurnqhFCbnsQWZhEFexWgsp7o40lmprPidENuvCOjrwJGWxTwcojTx5eQRoM+7 Pth4YCxKBVcBF/gytqH6kCE= Received: (qmail 126420 invoked by alias); 15 Jan 2016 10:03:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 126408 invoked by uid 89); 15 Jan 2016 10:03:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=process_options, Hx-languages-length:885 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 15 Jan 2016 10:03:02 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id C3CED5439D5; Fri, 15 Jan 2016 11:02:58 +0100 (CET) Date: Fri, 15 Jan 2016 11:02:58 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org, rguenther@suse.de Subject: Do not produce debug info during LTO compile stage Message-ID: <20160115100258.GB77658@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi, during LTO compile stage we currently build early dwarf debug info just to throw it away. This wastes quite some compile time and memory. Bootstrapped/regtested x86_64-linux, OK? Honza * toplev.c (process_options): Do not produce debug info during LTO compile time. Index: toplev.c =================================================================== --- toplev.c (revision 232407) +++ toplev.c (working copy) @@ -1386,7 +1386,10 @@ process_options (void) if (debug_info_level == DINFO_LEVEL_NONE) write_symbols = NO_DEBUG; - if (write_symbols == NO_DEBUG) + if (write_symbols == NO_DEBUG + /* When in compile stage of LTO build we do not output debug info. + Do not waste memory by building it. */ + || (flag_lto && !in_lto_p && !flag_fat_lto_objects)) ; #if defined(DBX_DEBUGGING_INFO) else if (write_symbols == DBX_DEBUG)