From patchwork Mon Oct 24 22:46:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 686227 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 3t2ry63k5Tz9sR9 for ; Tue, 25 Oct 2016 09:47:08 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=OwVNLRXT; 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:from :subject:to:cc:message-id:date:mime-version:content-type; q=dns; s=default; b=OWJjQdeqpKG8AFfx+pic23oa5V3ymnjzpcxAm0sG/D4KwCxhmK WbHSw8XkEkCzOWybzdl5VnyTkvy9kp44GG2xJ5XSgIm9FfgexE6TkBxdhk+nJkHd 6kJwPmPBWCnfcJWfkbHrB3FniLY2ASMsCL8z62ef7n6xIhlrWmgXcKOKE= 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:from :subject:to:cc:message-id:date:mime-version:content-type; s= default; bh=ae8vLQLDOYUaXK7QE71yv+1h7M8=; b=OwVNLRXTz8Hqlm2AtnVh pZBU9tVmot7vlMV0Z1ut+/PdlQ5R+6QWM6ZEI8+Xg8ylw13WkHEj8ZElJzfWRLy7 rKJZB/9XKyTJHjwgk+qC73zlOyQ8Nqw9wb2Aus6KyQBpNdlxFATj/JEtzBlXDxfc ddeZSz4n/cLiDioHYIYAHNQ= Received: (qmail 4921 invoked by alias); 24 Oct 2016 22:47:00 -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 4898 invoked by uid 89); 24 Oct 2016 22:46:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=20161025, 2016-10-25, TREE_CODE_CLASS, ipcp X-HELO: mail-pf0-f172.google.com Received: from mail-pf0-f172.google.com (HELO mail-pf0-f172.google.com) (209.85.192.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Oct 2016 22:46:49 +0000 Received: by mail-pf0-f172.google.com with SMTP id e6so106213076pfk.3 for ; Mon, 24 Oct 2016 15:46:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version; bh=Bgj0wmoina3eGyf1knlV6vL6fRoSsAtxUUr3mERacro=; b=Dn7CMZsVdzm+6TTvlB5WZIAiqx8ToytZCe/s1qDFf3EPGWtyJVJ1Mw7ffr0s/E0u/d mJxsPm1JRaeAarho1BT+RBDXaCMBObFnm6zNjdXO27Btgr4ZczTRVI5R6OzHNGiRgA8Z 08FXTLGHMbbWf+VTIXdxKHnZnZsvnULi3klDujg69MnYHaaF6oQvzhIkKdQeLybKaatx NRKyMpbWp4eWATbT5L03+r3OKpBTh4DuIgxrG1O1x2GLsniuKYqT1uMUb0obioG1F5Ig uUzf2JI8BZMGWqUViIdzEV5vsqYt/C6oq0fGmuuR4IDTa+T5M+vbVueYmDnnmtJnb2DU 6T/Q== X-Gm-Message-State: ABUngvfUl2kQ+7FdTC8GmRMDD4ELxoq4v/5NVDXTsEw+RTXDxwi7Y2t3qZ2lTGGxh5Z1uGCQ X-Received: by 10.98.65.85 with SMTP id o82mr33215094pfa.168.1477349207771; Mon, 24 Oct 2016 15:46:47 -0700 (PDT) Received: from [10.1.1.7] (58-6-183-210.dyn.iinet.net.au. [58.6.183.210]) by smtp.gmail.com with ESMTPSA id yu9sm27834975pab.15.2016.10.24.15.46.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Oct 2016 15:46:47 -0700 (PDT) From: kugan Subject: [IPCP] Remove unreachable code To: "gcc-patches@gcc.gnu.org" Cc: Prathamesh Kulkarni , Jan Hubicka , Martin Jambor Message-ID: <9a16aa02-ca87-48a9-562d-aa9042356260@linaro.org> Date: Tue, 25 Oct 2016 09:46:43 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi, I noticed that in ipcp_bits_lattice::meet_with we have: else if (TREE_CODE_CLASS (code) == tcc_unary) .... else if (code == NOP_EXPR) .... Since TREE_CODE_CLASS for NOP_EXPR is tcc_unary, if (code == NOP_EXPR) is unreachable and therefore removing it. I also don't think that we need any special casing for NOP_EXPR here. bit_value_unop handles already handles CASE_CONVERT. Is this OK if no regressions in bootstrap and regression testing. Thanks, Kugan gcc/ChangeLog: 2016-10-25 Kugan Vivekanandarajah * ipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code. diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 1dc5cb6..527ff27 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -1070,12 +1070,6 @@ ipcp_bits_lattice::meet_with (ipcp_bits_lattice& other, unsigned precision, return set_to_bottom (); } - else if (code == NOP_EXPR) - { - adjusted_value = other.m_value; - adjusted_mask = other.m_mask; - } - else return set_to_bottom ();