From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11451 invoked by alias); 12 Aug 2014 21:16:29 -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 11441 invoked by uid 89); 12 Aug 2014 21:16:28 -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, 12 Aug 2014 21:16:27 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7CLGQve008505 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 12 Aug 2014 17:16:26 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-24.phx2.redhat.com [10.3.113.24]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7CLGPsK020142; Tue, 12 Aug 2014 17:16:25 -0400 Message-ID: <53EA8429.4010103@redhat.com> Date: Tue, 12 Aug 2014 21:16: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: David Malcolm , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 009/236] Replace BB_HEAD et al macros with functions References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> <1407345815-14551-10-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1407345815-14551-10-git-send-email-dmalcolm@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg01212.txt.bz2 On 08/06/14 11:19, David Malcolm wrote: > This is further scaffolding; convert the BB_* and SET_BB_* macros > into functions. Convert the BB_* rvalue-style functions into returning > rtx_insn * rather than plain rtx. > > For now, this is done by adding a checked cast, but this will eventually > become a field lookup. The lvalue form for now returns an rtx& to allow > in-place modification. > > gcc/ > * basic-block.h (BB_HEAD): Convert to a function. Strengthen the > return type from rtx to rtx_insn *. > (BB_END): Likewise. > (BB_HEADER): Likewise. > (BB_FOOTER): Likewise. > (SET_BB_HEAD): Convert to a function. > (SET_BB_END): Likewise. > (SET_BB_HEADER): Likewise. > (SET_BB_FOOTER): Likewise. > > * cfgrtl.c (BB_HEAD): New function, from macro of same name. > Strengthen the return type from rtx to rtx_insn *. For now, this > is done by adding a checked cast, but this will eventually > become a field lookup. > (BB_END): Likewise. > (BB_HEADER): Likewise. > (BB_FOOTER): Likewise. > (SET_BB_HEAD): New function, from macro of same name. This is > intended for use as an lvalue, and so returns an rtx& to allow > in-place modification. > (SET_BB_END): Likewise. > (SET_BB_HEADER): Likewise. > (SET_BB_FOOTER): Likewise. OK. Jeff