From patchwork Mon Feb 27 16:35:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 732949 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 3vX6s26PvYz9s9r for ; Tue, 28 Feb 2017 03:40:38 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="qMOJOWXc"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-date:resent-message-id:resent-to:message-id :in-reply-to:references:from:date:subject:to:cc; q=dns; s= default; b=oNHkKm0+9kzAUztyfr+9S9c3sdPKyCAzQYRySNnaJFuWR5VX1OzaE kLtubUpXjO2fgc//9KL3lZSv88/See6GNF547g3TITpKyZ3Tk/0ATKwU4dMEoxLf 0iaFtAGWmOD4ve2fFjhmQHG7vF7Lf9+IrtYtQQFXvoYq53kaebXjj0= 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 :resent-from:resent-date:resent-message-id:resent-to:message-id :in-reply-to:references:from:date:subject:to:cc; s=default; bh=6 D/hSMUBttV3Uyvv9ZFNmEvTL/I=; b=qMOJOWXc/fbimh/Sl1l/AX2G6M7j/pif1 q5f24/pQWJNu7hbVp8+tGjvffzsGqM51UJuGuTNUv55vtpFlvLODb8Tx8VXrSHIT M8mPQkReOghWM4bjUrSq9J9uMdDdz5xEEspLYe/NkxGsfGIcr311ddePOaC6Y8EI 3NnKCBgMH4= Received: (qmail 120326 invoked by alias); 27 Feb 2017 16:39:50 -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 120201 invoked by uid 89); 27 Feb 2017 16:39:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=8677 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Feb 2017 16:39:45 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C5085ADA7 for ; Mon, 27 Feb 2017 16:39:43 +0000 (UTC) Resent-From: Martin Jambor Resent-Date: Mon, 27 Feb 2017 17:39:43 +0100 Resent-Message-ID: <20170227163943.spsnqek6aq6prhuk@virgil.suse.cz> Resent-To: GCC Patches , Jan Hubicka , Martin Liska Message-Id: In-Reply-To: References: From: Martin Jambor Date: Mon, 27 Feb 2017 17:35:22 +0100 Subject: [RFC PATCH 3/3] Remove ipa_update_after_lto_read To: GCC Patches Cc: Jan Hubicka , Martin Liska X-IsSubscribed: yes Hello, when working on call summaries, I have found a weird function ipa_update_after_lto_read which currently only makes sure that IPA-CP function and edge summaries exist, at times when they already have to exist. So I did some digging in history and found out that originally the function was meant for setting a called_with_var_arguments flags where appropriate after LTO stream-in. We have however removed that flag in 2011 and the function is basically useless since then (although only with call summaries it is definitely a no-OP). Thus, I'll propose to remove it next stage1. Thanks, Martin 2017-02-27 Martin Jambor * ipa-prop.c (ipa_update_after_lto_read): Removed. * ipa-prop.h (ipa_update_after_lto_read): Remove declaration. * ipa-cp.c (ipcp_propagate_stage): Do not call ipa_update_after_lto_read. * ipa-inline.c (ipa_inline): Likewise. --- gcc/ipa-cp.c | 4 ---- gcc/ipa-inline.c | 3 --- gcc/ipa-prop.c | 11 ----------- gcc/ipa-prop.h | 1 - 4 files changed, 19 deletions(-) diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index aa3c9973a66..6a6467ce8ba 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -3234,10 +3234,6 @@ ipcp_propagate_stage (struct ipa_topo_info *topo) if (dump_file) fprintf (dump_file, "\n Propagating constants:\n\n"); - if (in_lto_p) - ipa_update_after_lto_read (); - - FOR_EACH_DEFINED_FUNCTION (node) { struct ipa_node_params *info = IPA_NODE_REF (node); diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 4843f8a2f8e..b681c568c89 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -2379,9 +2379,6 @@ ipa_inline (void) order = XCNEWVEC (struct cgraph_node *, symtab->cgraph_count); - if (in_lto_p && optimize) - ipa_update_after_lto_read (); - if (dump_file) dump_inline_summaries (dump_file); diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 6d598763d02..47936a92adb 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -5096,17 +5096,6 @@ ipa_prop_read_jump_functions (void) } } -/* After merging units, we can get mismatch in argument counts. - Also decl merging might've rendered parameter lists obsolete. - Also compute called_with_variable_arg info. */ - -void -ipa_update_after_lto_read (void) -{ - ipa_check_create_node_params (); - ipa_check_create_edge_args (); -} - void write_ipcp_transformation_info (output_block *ob, cgraph_node *node) { diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index 4d8ee0d351d..bf5d02f8e3a 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -867,7 +867,6 @@ void ipa_prop_write_jump_functions (void); void ipa_prop_read_jump_functions (void); void ipcp_write_transformation_summaries (void); void ipcp_read_transformation_summaries (void); -void ipa_update_after_lto_read (void); int ipa_get_param_decl_index (struct ipa_node_params *, tree); tree ipa_value_from_jfunc (struct ipa_node_params *info, struct ipa_jump_func *jfunc);