From patchwork Thu Apr 7 13:35:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Kulkarni X-Patchwork-Id: 65322 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp83161lbl; Thu, 7 Apr 2016 06:35:44 -0700 (PDT) X-Received: by 10.98.93.155 with SMTP id n27mr4805646pfj.88.1460036144321; Thu, 07 Apr 2016 06:35:44 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o68si50905pfi.26.2016.04.07.06.35.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Apr 2016 06:35:44 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-424500-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-424500-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-424500-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 :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=CLMPbAjtCTCIdldqg4oidLvM6LocPJi4VyTMXaUHxFe5TX a8Yj+U4u+u6+4NJQxWvjPSJ3VNZyJXv6ySSPXgEsBcvFLPbgCW7Kh9/cDIRIjJRd NRYiG0xE2mA5EyhPVGWSz05t6govZokJcW9sGHLjOmg5Op5ADm9OivSY2Fbrw= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=Gsz2qlLWxES0/d4pGbgTVidNmlY=; b=fAQtHKmQWVdx1GYXJfQt N5TKVQ7GuZyqW7gr68IWGYBe62r79dm5MfFHNlXqo2tKORiAp/QaxDDvVWAuvxyh Axh4CytTPLvYnOmb5hOelLQAKQ5zMawjrEThishYaSkgukHwbAiYv1dDYhMIZGH/ WY90/LOF4ubOyijT6wvjQl4= Received: (qmail 62021 invoked by alias); 7 Apr 2016 13:35:24 -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 61888 invoked by uid 89); 7 Apr 2016 13:35:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-ig0-f172.google.com Received: from mail-ig0-f172.google.com (HELO mail-ig0-f172.google.com) (209.85.213.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 07 Apr 2016 13:35:12 +0000 Received: by mail-ig0-f172.google.com with SMTP id f1so153480309igr.1 for ; Thu, 07 Apr 2016 06:35:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=kpoMJa2fZPQJrVZIa9AQyKcXVWj/m1JDIlv6DY+OJq0=; b=c3O8o+Oi7M2jKz8IpHE8y1GJKXfrBZCjJ8dsEKsKwiPyevT46qpOl7VosRc59RGYgF 8AzCsIj0oyezLCBU3DT7Fx4DZYJNxEl2fQam2rlE07M04k8OKOs1tNunsxu0Avqwtnz0 P4qIykxKvFTAv7Xaz5Xu+Sztbqr6pKX1zC2AXRWmr5T2s96KwLHSFTb2NLwjfNZCN59n sfHMf9brF5GQhZGgjOoaX5fbiuoE1sf540iQ8X/e9ZZ/Na/RWwbBHnFygOo6Zr/nv7c9 uFw4X7oa5cxG79Oseprb/5S8bSagIxzgOon8xvEHrP6iPrGqshIC4DC6LG6Z5q0MMY95 eO4g== X-Gm-Message-State: AD7BkJIdkkFVTeoFT1Xm2IDvJUPkCChB4sGNibOSQ6dIyRGOL0R5ENZHnEO+PMK+j8KdLfT0pPUwcABM8Jmwn8QU MIME-Version: 1.0 X-Received: by 10.50.59.146 with SMTP id z18mr3639402igq.62.1460036109831; Thu, 07 Apr 2016 06:35:09 -0700 (PDT) Received: by 10.36.196.5 with HTTP; Thu, 7 Apr 2016 06:35:09 -0700 (PDT) Date: Thu, 7 Apr 2016 19:05:09 +0530 Message-ID: Subject: [lto-partition.c] move assignment to refs_node, last_visited_node outside if-else From: Prathamesh Kulkarni To: gcc Patches X-IsSubscribed: yes Hi, This is a silly patch that moves the following assignments outside if-else conditionals, refs_node = node; last_visited_node++; resulting in empty else block. OK for trunk ? Thanks, Prathamesh diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c index 9eb63c2..dca59af 100644 --- a/gcc/lto/lto-partition.c +++ b/gcc/lto/lto-partition.c @@ -568,14 +568,13 @@ lto_balanced_map (int n_lto_partitions) symtab_node *snode = lto_symtab_encoder_deref (partition->encoder, last_visited_node); + refs_node = snode; + last_visited_node++; + if (cgraph_node *node = dyn_cast (snode)) { struct cgraph_edge *edge; - refs_node = node; - - last_visited_node++; - gcc_assert (node->definition || node->weakref); /* Compute boundary cost of callgraph edges. */ @@ -614,11 +613,6 @@ lto_balanced_map (int n_lto_partitions) cost += edge_cost; } } - else - { - refs_node = snode; - last_visited_node++; - } /* Compute boundary cost of IPA REF edges and at the same time look into variables referenced from current partition and try to add them. */