From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125055 invoked by alias); 1 Jun 2015 20:50:32 -0000 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 Received: (qmail 124972 invoked by uid 89); 1 Jun 2015 20:50:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 01 Jun 2015 20:50:26 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzWf5-0005Q8-S0 for gcc-patches@gcc.gnu.org; Mon, 01 Jun 2015 16:50:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzWf5-0005PJ-Ln for gcc-patches@gcc.gnu.org; Mon, 01 Jun 2015 16:50:19 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id E0BE7373BC4; Mon, 1 Jun 2015 20:50:17 +0000 (UTC) Received: from c64.redhat.com (vpn-230-103.phx2.redhat.com [10.3.230.103]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t51KoE5B030113; Mon, 1 Jun 2015 16:50:17 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org, binutils@sourceware.org Cc: David Malcolm Subject: [PATCH 04/16] gcc: Don't keep reinitializing RTL Date: Mon, 01 Jun 2015 20:50:00 -0000 Message-Id: <1433192664-50156-5-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1433192664-50156-1-git-send-email-dmalcolm@redhat.com> References: <1433192664-50156-1-git-send-email-dmalcolm@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00119.txt.bz2 This may be something of a hack; it appears to work for x86_64. Before: initialize rtl : 1.50 (63%) usr 0.02 (10%) sys 1.34 (23%) wall 1156 kB ( 5%) ggc rest of compilation : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.03 ( 1%) wall 232 kB ( 1%) ggc TOTAL : 2.37 0.21 5.86 21438 kB ./test-benchmark.c.exe: 100 iterations at optlevel 0 took a total of 5.870s (0.059s per iteration) After: initialize rtl : 0.01 ( 1%) usr 0.01 ( 4%) sys 0.02 ( 0%) wall 12 kB ( 0%) ggc rest of compilation : 0.03 ( 3%) usr 0.01 ( 4%) sys 0.03 ( 1%) wall 232 kB ( 1%) ggc TOTAL : 1.03 0.24 4.53 20294 kB ./test-benchmark.c.exe: 100 iterations at optlevel 0 took a total of 4.530s (0.045s per iteration) (i.e. saves about 10-15ms per iteration) gcc/ChangeLog: * ira-costs.c (ira_costs_c_finalize): Delete. * ira.h (void ira_costs_c_finalize): Delete. * toplev.c (lang_dependent_init_target): Remove assertion tha this_target_rtl->target_specific_initialized is false. (finalize): Remove call to lra_finish_once. (toplev::finalize): Don't unset "rtl_initialized" and "this_target_rtl->target_specific_initialized". Remove call t ira_costs_c_finalize. --- gcc/ira-costs.c | 6 ------ gcc/ira.h | 3 --- gcc/toplev.c | 8 -------- 3 files changed, 17 deletions(-) diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index fa6aec4..cfe416d 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -2367,9 +2367,3 @@ ira_adjust_equiv_reg_cost (unsigned regno, int cost) else regno_equiv_gains[regno] += cost; } - -void -ira_costs_c_finalize (void) -{ - this_target_ira_int->free_ira_costs (); -} diff --git a/gcc/ira.h b/gcc/ira.h index 5b52cb1..306692d 100644 --- a/gcc/ira.h +++ b/gcc/ira.h @@ -206,7 +206,4 @@ extern bool ira_bad_reload_regno (int, rtx, rtx); extern void ira_adjust_equiv_reg_cost (unsigned, int); -/* ira-costs.c */ -extern void ira_costs_c_finalize (void); - #endif /* GCC_IRA_H */ diff --git a/gcc/toplev.c b/gcc/toplev.c index 3527b5d..12806d0 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1806,8 +1806,6 @@ lang_dependent_init_target (void) front end is initialized. It also depends on the HAVE_xxx macros generated from the target machine description. */ init_optabs (); - - gcc_assert (!this_target_rtl->target_specific_initialized); } /* Perform initializations that are lang-dependent or target-dependent. @@ -1998,8 +1996,6 @@ finalize (bool no_backend) statistics_fini (); g->get_passes ()->finish_optimization_passes (); - - lra_finish_once (); } if (mem_report) @@ -2207,9 +2203,6 @@ toplev::main (int argc, char **argv) void toplev::finalize (void) { - rtl_initialized = false; - this_target_rtl->target_specific_initialized = false; - /* Needs to be called before cgraph_c_finalize since it uses symtab. */ ipa_reference_c_finalize (); @@ -2218,7 +2211,6 @@ toplev::finalize (void) dwarf2out_c_finalize (); gcse_c_finalize (); ipa_cp_c_finalize (); - ira_costs_c_finalize (); params_c_finalize (); finalize_options_struct (&global_options); -- 1.8.5.3