From patchwork Sun Jan 9 23:01:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 78059 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]) by ozlabs.org (Postfix) with SMTP id 036CEB70FE for ; Mon, 10 Jan 2011 10:01:26 +1100 (EST) Received: (qmail 23131 invoked by alias); 9 Jan 2011 23:01:24 -0000 Received: (qmail 23123 invoked by uid 22791); 9 Jan 2011 23:01:23 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 09 Jan 2011 23:01:19 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id AA8239AC849; Mon, 10 Jan 2011 00:01:17 +0100 (CET) Date: Mon, 10 Jan 2011 00:01:17 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org, rguenther@suse.de Subject: Disable ipa-reference with -fprofile-arcs Message-ID: <20110109230117.GC21649@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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 Hi, this patch workarounds problems with ipa-reference and profile feedback. Profile feedback adds static var access into every function in program. Especially with LTO this makes ipa-reference tables to explode. It is the case for Mozilla build where LTO -fprofile-generate OOms for me after allocating 9GB of bitmaps. lto-Profilebootstrapped/regtested x86_64-linux, OK? Honza PR tree-optimization/47233 * opts.c (common_handle_option): Disable ipa-reference with profile feedback. Index: opts.c =================================================================== --- opts.c (revision 168596) +++ opts.c (working copy) @@ -1561,6 +1561,11 @@ common_handle_option (struct gcc_options opts->x_flag_value_profile_transformations = value; if (!opts_set->x_flag_inline_functions) opts->x_flag_inline_functions = value; + /* 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_flag_ipa_reference = false; break; case OPT_fshow_column: