From patchwork Fri Apr 19 21:31:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 238120 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 886362C0223 for ; Sat, 20 Apr 2013 07:33:40 +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:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=oCsMlAB679A+SdJxVi4j5UphE9BL6yh8Q51pjvcGKDmhhs4MflBAs HhvpSTEmpzIRcCdN4Faz6clcaN2yRELvMYfwn9xzCgDF3mSJ6wQj8mYDZuvROLk8 k+uQ7MsuI+pNAfreZeVwgiQkPmOqTjymtZhlrTEPvLo5+MMG5Xo1Xw= 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:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=Vp4RygjZFLb4DTX6UlDjivK/LF4=; b=rNKRN5H366UiIUPcNcZV 2HZPQMCgRBisX1z5JEuoDxAPiqejUf+opSkAUBnrRj3yDReuVsP8tewBQOBM4Fxw nawouJrUmoK9cj7HUswCpJRm/leIst121H7SEEUJpbFL6/smtdJltv/zsUi/HkTJ p1CzVyOOj0ppk4Yx9rz1G90= Received: (qmail 598 invoked by alias); 19 Apr 2013 21:32:16 -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 553 invoked by uid 89); 19 Apr 2013 21:32:16 -0000 X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from one.firstfloor.org (HELO one.firstfloor.org) (193.170.194.197) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 19 Apr 2013 21:32:14 +0000 Received: by one.firstfloor.org (Postfix, from userid 503) id E63A88676A; Fri, 19 Apr 2013 23:32:07 +0200 (CEST) From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: hubicka@ucw.cz, Andi Kleen Subject: [PATCH 8/9] Print lto report at the right place Date: Fri, 19 Apr 2013 23:31:56 +0200 Message-Id: <1366407117-18462-9-git-send-email-andi@firstfloor.org> In-Reply-To: <1366407117-18462-1-git-send-email-andi@firstfloor.org> References: <1366407117-18462-1-git-send-email-andi@firstfloor.org> From: Andi Kleen The LTO report is currently printed when the type merging hash tables are already destroyed, which makes them always show up as empty. Print it earlier. Right now it's printed twice. gcc/: 2013-04-19 Andi Kleen * lto/lto.c (print_lto_report_1): Declare early. (read_cgraph_and_symbols): Call print_lto_report_1 early. --- gcc/lto/lto.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index dbef690..893f4e5 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -2906,6 +2906,8 @@ lto_flatten_files (struct lto_file_decl_data **orig, int count, int last_file_ix static int real_file_count; static GTY((length ("real_file_count + 1"))) struct lto_file_decl_data **real_file_decl_data; +static void print_lto_report_1 (void); + /* Read all the symbols from the input files FNAMES. NFILES is the number of files requested in the command line. Instantiate a global call graph by aggregating all the sub-graphs found in each @@ -2999,6 +3001,10 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) if (resolution_file_name) fclose (resolution); + /* Show the LTO report before launching LTRANS. */ + if (flag_lto_report || (flag_wpa && flag_lto_report_wpa)) + print_lto_report_1 (); + /* Free gimple type merging datastructures. */ htab_delete (gimple_types); gimple_types = NULL;