From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15313 invoked by alias); 5 Aug 2014 20:48:45 -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 15303 invoked by uid 89); 5 Aug 2014 20:48:44 -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,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, 05 Aug 2014 20:48:34 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s75KmX8T001710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Aug 2014 16:48:33 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-85.phx2.redhat.com [10.3.113.85]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s75KmWBl008520; Tue, 5 Aug 2014 16:48:32 -0400 Message-ID: <53E14320.20001@redhat.com> Date: Tue, 05 Aug 2014 20:48:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: Re: [PATCH 01/50] Add rtl-iter.h References: <87y4v5d77q.fsf@googlemail.com> <87tx5td75d.fsf@googlemail.com> In-Reply-To: <87tx5td75d.fsf@googlemail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00376.txt.bz2 On 08/03/14 07:39, Richard Sandiford wrote: > This patch adds the new iterators. > > > gcc/ > * rtl-iter.h: New file. > * rtlanal.c: Include it. > (rtx_all_subrtx_bounds, rtx_nonconst_subrtx_bounds): New variables. > (generic_subrtx_iterator ::add_single_to_queue) > (generic_subrtx_iterator ::add_subrtxes_to_queue) > (generic_subrtx_iterator ::free_array): New functions. > (generic_subrtx_iterator ::LOCAL_ELEMS): Define. > (generic_subrtx_iterator ) > (generic_subrtx_iterator > (generic_subrtx_iterator ): Instantiate. > (setup_reg_subrtx_bounds): New function. > (init_rtlanal): Call it. OK. Just one nit... > + > +/* This structure describes the subrtxes of an rtx as follows: > + > + - if the rtx has no subrtxes, START and COUNT are both 0. Seems reasonable. > +static inline bool > +leaf_code_p (enum rtx_code code) > +{ > + return rtx_all_subrtx_bounds[code].count == 0; > +} But we only check COUNT here. It's a minor inconsistency. Your call what (if anything) to do about it. Jeff