From patchwork Tue Mar 3 10:05:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 445650 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 AE0C61400EA for ; Tue, 3 Mar 2015 21:05:24 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ZLtOZy0O; dkim-adsp=none (unprotected policy); 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=fzJgrCmySCFEo5RHE S9wtbUSuVLKYo+R6iNIplvzY4JDAR7e+iq9shbsjer4/yRFg0UAtZ/zU/C8B5Qb6 yBaJbhzyzLUBElYLOPxjeH2xMRX+sCpxGUO2EzFW33dkVTsuHYLuq41IJ5gMjWtN 3AI8pcte0bqfzV6kZjw4Oq+oiI= 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:cc:subject:references :in-reply-to:content-type; s=default; bh=ggVLoUk9S/CboM4iScChRPI Uenw=; b=ZLtOZy0OyM98Ct7bL/DxCOadTpLL6CdozCg2K6hzU3vbS35oWBITww5 /BBh7LFweZhyhqamCjgzvRS/FPm0yEbLoyjg7SyImBoW/8tS8TVAM9fviqQpL35W 32zAa1I6glovKC35gSIMmI7FEDD7m9dJdtxms0gStnYsomh+M/jg= Received: (qmail 118919 invoked by alias); 3 Mar 2015 10:05: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 118909 invoked by uid 89); 3 Mar 2015 10:05:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 03 Mar 2015 10:05:16 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D7064ABA2; Tue, 3 Mar 2015 10:05:12 +0000 (UTC) Message-ID: <54F58758.6020508@suse.cz> Date: Tue, 03 Mar 2015 11:05:12 +0100 From: =?UTF-8?B?TWFydGluIExpxaFrYQ==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: polacek@redhat.com Subject: Re: [PATCH] Fix PR ipa/65087 References: <54F49553.7030302@suse.cz> <20150302172004.GC67273@kam.mff.cuni.cz> <54F57F65.9050205@suse.cz> <20150303095008.GE11480@redhat.com> In-Reply-To: <20150303095008.GE11480@redhat.com> X-IsSubscribed: yes On 03/03/2015 10:50 AM, Marek Polacek wrote: > On Tue, Mar 03, 2015 at 10:31:17AM +0100, Martin Liška wrote: >> @@ -2952,9 +2959,12 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count) >> alias->dump_to_file (dump_file); >> } >> >> - source->merge (alias); >> + if (source->merge (alias)) >> + merged_p = true; > > I thinks it's better to write this as > > merged_p |= source->merge (alias); > > Marek > Good point, I hope following patch can be installed as obvious. Martin From d8c3312e36813dd6ccd02567e5effc0dc44bb212 Mon Sep 17 00:00:00 2001 From: mliska Date: Tue, 3 Mar 2015 11:03:35 +0100 Subject: [PATCH] ICF: Use bit or instead of if branch. gcc/ChangeLog: 2015-03-03 Martin Liska * ipa-icf.c (sem_item_optimizer::merge_classes): Use bit or instead of if branch. --- gcc/ipa-icf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 9cdd73e..41c2304 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -2959,8 +2959,7 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count) alias->dump_to_file (dump_file); } - if (source->merge (alias)) - merged_p = true; + merged_p |= source->merge (alias); } } -- 2.1.2