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: 79103 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp2821299qge; Mon, 24 Oct 2016 15:47:16 -0700 (PDT) X-Received: by 10.98.196.17 with SMTP id y17mr32984333pff.172.1477349236124; Mon, 24 Oct 2016 15:47:16 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id u1si17629365pge.150.2016.10.24.15.47.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Oct 2016 15:47:16 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-439459-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-439459-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-439459-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org 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=Q1b3BMNhPp9ur0TtNdDn87wWGrYL7S/zcvAFJblncrQd2P8ZVV ksbWY4Kzv2acKSU4MoWNjubFJ16UkiVdTFGmC14pj9oHfCIWYadYsVXA1QCHRTf5 dU7Nf512KnUFCJTE0U9U4iLd2atQn5eLyenK6XIRGqjI0ipYH/KaZsqsk= 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=pJ4AlHmoPp1a6oJKTwK0 FLSyWxGrlwI7dVPQqVDQPwS28IHyZZJfUUnXc3Pn4WGdgO/yGiWz63DstUDmEB6L af3iQPCVzM0Pw90QF14bAQzyjbNH2eRIFD+pvJVaqJuVVUo9LbAkJh4RkhT8ZbIN VVVDnqdHOw5hJDStTX4GP7A= 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 ();