From patchwork Thu Oct 29 15:24:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 537910 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 5399314012C for ; Fri, 30 Oct 2015 02:24:24 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=klUpWIeA; 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 :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=lplSXydkLRD+QtjR fN5Y6P6V82hti86HYyY4zVB/x4mI7XppE7mGE7XBvVcUCiJcWEY2AaNAOJvc+rfq VqxaWxRhp1eFvJm3Zc1ME235ePMQzgdP3ERQ1NABRrp4G0cHJG384UgJl7/k5Ixw J1LOl2KF50CfRSi2jeCfL9JMWaM= 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 :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=9rbT/UrMDNlCzkMHh1I8rg AEHCU=; b=klUpWIeAmZ4RB24a14uTgSFt5s72e3qP95HE2AuLABYRucTB99EW90 qNLFaxiphzeXbauyP22tSElbeFTFFex9SB5rUdvM1VndjktFkdGQS/dD+h2m10lN 1CViVGZAkSQ5+xjpzVpIQ1vH7ZqjNZDT1J3g3F5VK5TWmKx2Y7xDo= Received: (qmail 110745 invoked by alias); 29 Oct 2015 15:24:16 -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 110735 invoked by uid 89); 29 Oct 2015 15:24:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Oct 2015 15:24:14 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-23-1emCLJdqSn-UIAoaTMEMrw-1; Thu, 29 Oct 2015 15:24:08 +0000 Received: from localhost ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 29 Oct 2015 15:24:08 +0000 From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [committed] Remove redundant variable from tree-call-cdce.c Date: Thu, 29 Oct 2015 15:24:08 +0000 Message-ID: <87mvv1u293.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-MC-Unique: 1emCLJdqSn-UIAoaTMEMrw-1 shrink_wrap_one_built_in_call had both guard_bb and guard_bb0. It looks like an earlier version of the pass may have updated one of the variables in the while loop, but now they're just two names for the same thing. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. Committed as obvious. Thanks, Richard gcc/ * tree-call-cdce.c (shrink_wrap_one_built_in_call): Remove guard_bb0 and use guard_bb throughout. diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c index e68d03d..ff5cd9b 100644 --- a/gcc/tree-call-cdce.c +++ b/gcc/tree-call-cdce.c @@ -717,7 +717,7 @@ static bool shrink_wrap_one_built_in_call (gcall *bi_call) { gimple_stmt_iterator bi_call_bsi; - basic_block bi_call_bb, join_tgt_bb, guard_bb, guard_bb0; + basic_block bi_call_bb, join_tgt_bb, guard_bb; edge join_tgt_in_edge_from_call, join_tgt_in_edge_fall_thru; edge bi_call_in_edge0, guard_bb_in_edge; unsigned tn_cond_stmts, nconds; @@ -775,22 +775,21 @@ shrink_wrap_one_built_in_call (gcall *bi_call) bi_call_in_edge0 = split_block (bi_call_bb, cond_expr); bi_call_in_edge0->flags &= ~EDGE_FALLTHRU; bi_call_in_edge0->flags |= EDGE_TRUE_VALUE; - guard_bb0 = bi_call_bb; + guard_bb = bi_call_bb; bi_call_bb = bi_call_in_edge0->dest; - join_tgt_in_edge_fall_thru = make_edge (guard_bb0, join_tgt_bb, + join_tgt_in_edge_fall_thru = make_edge (guard_bb, join_tgt_bb, EDGE_FALSE_VALUE); bi_call_in_edge0->probability = REG_BR_PROB_BASE * ERR_PROB; bi_call_in_edge0->count = - apply_probability (guard_bb0->count, + apply_probability (guard_bb->count, bi_call_in_edge0->probability); join_tgt_in_edge_fall_thru->probability = inverse_probability (bi_call_in_edge0->probability); join_tgt_in_edge_fall_thru->count = - guard_bb0->count - bi_call_in_edge0->count; + guard_bb->count - bi_call_in_edge0->count; /* Code generation for the rest of the conditions */ - guard_bb = guard_bb0; while (nconds > 0) { unsigned ci0;