From patchwork Fri Nov 8 07:07:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1194151 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-513214-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="tMzGm+Bc"; 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 47CfKM5gk6z9sNT for ; Wed, 13 Nov 2019 20:22:47 +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 :resent-from:resent-to:resent-date:resent-message-id:message-id :in-reply-to:references:from:date:subject:to:mime-version :content-type; q=dns; s=default; b=Wr4lKZHnL7w4VhW/WBZUeZxFYt71R WEvEjcgUUl4LGstJqNZ1wD6y0ZM4wDTmpTVYbWzY7zz9djwCQcYoqFHiO25Fx6oK yZ/bWShtOk7l89XfaBYFmBuz7WRy5AGYmbOmjwERMpH+rl+1cQTd2WhWFQ8RyQfd HiQo9mOoWoe+s8= 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-to:resent-date:resent-message-id:message-id :in-reply-to:references:from:date:subject:to:mime-version :content-type; s=default; bh=G+CHMGuKcsYteYO3XaRG46yyWIc=; b=tMz Gm+Bc6AYfwY26bhAGXWk8GuimA9IUWlpDoWLCcLPDoL8jlZOJMbwKa1jnYptY5+e RjtF9pm2GOvoMrAel9wVyED5lOv9CR4Em6Fg54KWj6ZFQCXg8ftjrpCb1FlSVISa yKBiac3wICJ422tI8AE2d4isfzZh1r7EDBPLZpQQ= Received: (qmail 43868 invoked by alias); 13 Nov 2019 09:22:17 -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 43816 invoked by uid 89); 13 Nov 2019 09:22:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:783 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Nov 2019 09:22:15 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7E84AB23F for ; Wed, 13 Nov 2019 09:22:13 +0000 (UTC) Resent-From: =?utf-8?q?Martin_Li=C5=A1ka?= Resent-To: GCC Patches Resent-Date: Wed, 13 Nov 2019 10:22:13 +0100 Resent-Message-ID: <465cb607-77b5-f6f9-b2e3-45de85f8c66a@suse.cz> Message-Id: <1bb908adb191b1855328e1e38825b367f74746a7.1573636740.git.mliska@suse.cz> In-Reply-To: References: From: Martin Liska Date: Fri, 8 Nov 2019 08:07:22 +0100 Subject: [PATCH 1/5] Do not overuse push/pop_cfun in IPA ICF. To: gcc-patches@gcc.gnu.org MIME-Version: 1.0 X-IsSubscribed: yes gcc/ChangeLog: 2019-11-11 Martin Liska * ipa-icf.c (sem_function::equals_private): Do not overuse push/pop_cfun functions. --- gcc/ipa-icf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 10aa4b76463..53e387403c8 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -877,14 +877,9 @@ sem_function::equals_private (sem_item *item) } /* Checking all basic blocks. */ - push_cfun (DECL_STRUCT_FUNCTION (decl)); for (unsigned i = 0; i < bb_sorted.length (); ++i) if(!m_checker->compare_bb (bb_sorted[i], m_compared_func->bb_sorted[i])) - { - pop_cfun (); - return return_false (); - } - pop_cfun (); + return return_false (); auto_vec bb_dict;