From patchwork Fri Dec 13 19:42:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 301162 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B0A5A2C0091 for ; Sat, 14 Dec 2013 06:43:15 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=HU09+HJbbouO6jzvEddxXHzbuwcTwQJtnb5jtifmdccJPw zHtewmAnOYeML+IQUN5d4Va1ki1LCxPkA6KE2Y0v+swFpH1RO5LhIAWTcc/8eWi3 6GfdhwIulJEAH2DPIcTBJHpO5/QlQyvXrUomk5tX9OyAAv0Z5wc2TzBvwWMPU= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=5j9rHMH6UXo0hmAwKpPLwUcsEjU=; b=EtatlgbbSSezZ4prufhd 2su1Y/UJFyLCzNzLEt3yTI9I1niwu8B5JecASUby8s+oJbGZf4/OeiSQ7XppiTe3 a2P1yam1101WAFIdP0kPahG8C6dfycmEK96/nWqMsWwV3q+oioDEcSnxYj7BNNZI iTQnZ8MIIhuqmeDgRF3KY04= Received: (qmail 20805 invoked by alias); 13 Dec 2013 19:42:31 -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 20676 invoked by uid 89); 13 Dec 2013 19:42:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2013 19:42:29 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBDJgRaK027965 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 13 Dec 2013 14:42:27 -0500 Received: from reynosa.quesejoda.com (vpn-61-18.rdu2.redhat.com [10.10.61.18]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rBDJgRsM007243 for ; Fri, 13 Dec 2013 14:42:27 -0500 Message-ID: <52AB6322.4050108@redhat.com> Date: Fri, 13 Dec 2013 11:42:26 -0800 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: gcc-patches Subject: [patch] remove gate for ipa_inline pass I'm fixing something completely unrelated, and noticed this... Perhaps I'm missing something, but why do we need a gate when it always returns true? Now that we have this `pass_data' business, we can set has_gate to false. I also fixed a minor typo in a comment. Tested on x86-64 Linux. OK? commit a89f826a3c832da2d572bee9608d407b338efe9f Author: Aldy Hernandez Date: Thu Dec 12 15:14:28 2013 -0800 * ipa-inline.c (gate_ipa_inline): Remove. (const pass_data pass_data_ipa_inline): Unset has_gate. (class pass_ipa_inline): Remove gate() method. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 715b3a2..dd5d86e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-12-12 Aldy Hernandez + + * ipa-inline.c (gate_ipa_inline): Remove. + (const pass_data pass_data_ipa_inline): Unset has_gate. + (class pass_ipa_inline): Remove gate() method. + 2013-12-09 Richard Biener PR middle-end/38474 diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 38157ca..9fd5d41 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -2339,19 +2339,6 @@ make_pass_early_inline (gcc::context *ctxt) return new pass_early_inline (ctxt); } - -/* When to run IPA inlining. Inlining of always-inline functions - happens during early inlining. - - Enable inlining unconditoinally, because callgraph redirection - happens here. */ - -static bool -gate_ipa_inline (void) -{ - return true; -} - namespace { const pass_data pass_data_ipa_inline = @@ -2359,7 +2346,7 @@ const pass_data pass_data_ipa_inline = IPA_PASS, /* type */ "inline", /* name */ OPTGROUP_INLINE, /* optinfo_flags */ - true, /* has_gate */ + false, /* has_gate */ true, /* has_execute */ TV_IPA_INLINING, /* tv_id */ 0, /* properties_required */ @@ -2386,7 +2373,6 @@ public: {} /* opt_pass methods: */ - bool gate () { return gate_ipa_inline (); } unsigned int execute () { return ipa_inline (); } }; // class pass_ipa_inline diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h index d871fc4..741d6eb 100644 --- a/gcc/tree-inline.h +++ b/gcc/tree-inline.h @@ -162,8 +162,8 @@ typedef struct eni_weights_d /* Cost of return. */ unsigned return_cost; - /* True when time of statemnt should be estimated. Thus i.e - cost of switch statement is logarithmic rather than linear in number + /* True when time of statement should be estimated. Thus, the + cost of a switch statement is logarithmic rather than linear in number of cases. */ bool time_based; } eni_weights;