From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23149 invoked by alias); 19 Aug 2014 21:38:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 23138 invoked by uid 89); 19 Aug 2014 21:38:58 -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,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 19 Aug 2014 21:38:57 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7JLctsI017254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Aug 2014 17:38:55 -0400 Received: from [10.3.225.110] (vpn-225-110.phx2.redhat.com [10.3.225.110]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7JLcsXN008207; Tue, 19 Aug 2014 17:38:55 -0400 Message-ID: <1408484146.2473.128.camel@surprise> Subject: Re: [PATCH 225/236] Work towards NEXT_INSN/PREV_INSN requiring insns as their params From: David Malcolm To: Richard Henderson Cc: gcc-patches@gcc.gnu.org Date: Tue, 19 Aug 2014 21:38:00 -0000 In-Reply-To: <53F3BA30.4050301@redhat.com> References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> <1407345815-14551-226-git-send-email-dmalcolm@redhat.com> <53F3BA30.4050301@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg01960.txt.bz2 On Tue, 2014-08-19 at 13:57 -0700, Richard Henderson wrote: > On 08/06/2014 10:23 AM, David Malcolm wrote: > > diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c > > index 59d633d..5e42a97 100644 > > --- a/gcc/cfgrtl.c > > +++ b/gcc/cfgrtl.c > > @@ -1604,6 +1604,7 @@ force_nonfallthru_and_redirect (edge e, basic_block target, rtx jump_label) > > > > if (EDGE_COUNT (e->src->succs) >= 2 || abnormal_edge_flags || asm_goto_edge) > > { > > + rtx_insn *note; > > gcov_type count = e->count; > > int probability = e->probability; > > /* Create the new structures. */ > > A new variable with no uses? This one is quite ugly: the pre-existing code has two locals named "note", both of type rtx, with one shadowing the other. This patch introduces a third, within the scope where the name "note" is used for insns. In the other scopes the two other "note" variables are used for find_reg_note. In each case, the name "note" is written to before use. So in my defense, the existing code already had shadowing of locals... but I guess that's not much of a defense, and it would be better to introduce a different name, and rename the uses in the appropriate scope. Thanks Dave