From patchwork Sun Nov 10 16:05:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 1192635 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-512897-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="UWO7dEpW"; dkim-atps=neutral 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 479zPF3KbBz9s4Y for ; Mon, 11 Nov 2019 03:05:19 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=M8LIzezdPJSladBIZrD7VEAMvraSDWrvX7xR4GTbOwdnVF1bD7eas /0xW7Pk4/5HxvyuKw7MuRUkKoSUkAu9lkFeLtk0zUvEbPTlxRxNoXvf3KhtHzdvc nbhbhkl2NNyWw2pyCMoDGRFdMyf/RTGZjtfsjc5VHWeBjmlSX9lY1g= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=3ElA0OuoZtrRGlQ0s1N4wQ6YUe4=; b=UWO7dEpWJP7EENXIBa2+ WGgwCtRtTel7rKaVQc+YKFGXlf3zI5mSHyMBwGbn3iNLJEYikOxzkQA38mwNZ++R E5fjovjvvwcS20F02Y5rMrVgmpOOArqTenHQVyKAcDTy7Xojgf8XSJbAWuomDVw7 Rd8f9loFXZBHrtaBVP1W2QU= Received: (qmail 74190 invoked by alias); 10 Nov 2019 16:05:11 -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 74181 invoked by uid 89); 10 Nov 2019 16:05:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 10 Nov 2019 16:05:09 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id C8873282890; Sun, 10 Nov 2019 17:05:06 +0100 (CET) Date: Sun, 10 Nov 2019 17:05:06 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org, mjambor@suse.cz Subject: Free ipa args summary after inlining Message-ID: <20191110160506.ql7yeghfveajowft@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Hi, this patch adds removal of ipa_edge_args_sum for the inlined edges. It turns out that those are still needed for described uses (though I am not sure why described uses are counted across all inline duplicates rather than handled for each of them independently), so I keep those. Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipa edge args summaries of inlined edge unless it holds info about described reference. Index: ipa-prop.c =================================================================== --- ipa-prop.c (revision 278016) +++ ipa-prop.c (working copy) @@ -3727,6 +3727,26 @@ ipa_propagate_indirect_call_infos (struc changed = propagate_info_to_inlined_callees (cs, cs->callee, new_edges); ipa_node_params_sum->remove (cs->callee); + class ipa_edge_args *args = IPA_EDGE_REF (cs); + if (args) + { + bool ok = true; + if (args->jump_functions) + { + struct ipa_jump_func *jf; + int i; + FOR_EACH_VEC_ELT (*args->jump_functions, i, jf) + if (jf->type == IPA_JF_CONST + && ipa_get_jf_constant_rdesc (jf)) + { + ok = false; + break; + } + } + if (ok) + ipa_edge_args_sum->remove (cs); + } + return changed; }