From patchwork Thu Apr 17 06:01:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 339785 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 60052140098 for ; Thu, 17 Apr 2014 16:01:23 +1000 (EST) 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=ILAs5JvCERJDiyBNECt8Aj9k6wB0BU8eelmPqqYz9e3xskgAYQQLL arVBo5uaMYgihNuSsSQsjNWJYSnxZDaN9J9lEJhebRp4dXCV9erxxDX8MRvZOx0E jNIG6+8IzHDg+QDEvANYrwrJD28y3Ktq6xq8kIDqPKXds0cvTEmnls= 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=GvPFOhCN1KCG9LdccARIHys0FlE=; b=pDGJ7ZDhlNMQcnDEAhpo S6c1CJinEUrvu8aNOCQaA7bbJ3zAUV0ypKmG3ln6vZpxAQB4SVVU4eLbLEYKONUY lgTUuE9V+aE/AiKA/EZXNL1sGb+RmYxJIwJo1/nDTHsyb0HwY8sYljCtAiMyx7Eh QZKXnSEPuGkD6V/pwTDSiIc= Received: (qmail 10908 invoked by alias); 17 Apr 2014 06:01:17 -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 10898 invoked by uid 89); 17 Apr 2014 06:01:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD autolearn=ham version=3.3.2 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; Thu, 17 Apr 2014 06:01:09 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id A505D543D8E; Thu, 17 Apr 2014 08:01:06 +0200 (CEST) Date: Thu, 17 Apr 2014 08:01:06 +0200 From: Jan Hubicka To: gcc-patches@gcc.gnu.org, rguenther@suse.de Subject: Reduce -flto -fprofile-generate memory use Message-ID: <20140417060106.GB3767@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi, while compiling firefox I noticed that -fprofile-generage -flto goes to 8GB. It turns out that this is caused by ipa_reference no longer being disabled becaus in_lto_p became flag that is set later (it is not clear to me why it needs to be this way). I however do not see reason why not disable ipa-reference for non-lto path, too. Bootstrapped/regtested x86_linux, comitted to mainline. OK for 4.9.1? Honza Index: ChangeLog =================================================================== --- ChangeLog (revision 209461) +++ ChangeLog (working copy) @@ -1,5 +1,10 @@ 2014-04-16 Jan Hubicka + * opts.c (common_handle_option): Disable -fipa-reference coorectly + with -fuse-profile. + +2014-04-16 Jan Hubicka + * ipa-devirt.c (odr_type_d): Add field all_derivations_known. (type_all_derivations_known_p): New predicate. (type_all_ctors_visible_p): New predicate. Index: opts.c =================================================================== --- opts.c (revision 209461) +++ opts.c (working copy) @@ -1732,7 +1732,7 @@ common_handle_option (struct gcc_options /* FIXME: Instrumentation we insert makes ipa-reference bitmaps quadratic. Disable the pass until better memory representation is done. */ - if (!opts_set->x_flag_ipa_reference && opts->x_in_lto_p) + if (!opts_set->x_flag_ipa_reference) opts->x_flag_ipa_reference = false; break;