From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8056 invoked by alias); 19 Aug 2014 16:43:05 -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 8041 invoked by uid 89); 19 Aug 2014 16:43:04 -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 16:43:03 +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 s7JGh2HH018176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Aug 2014 12:43:02 -0400 Received: from [10.3.225.110] (vpn-225-110.phx2.redhat.com [10.3.225.110]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7JGh15L008806; Tue, 19 Aug 2014 12:43:01 -0400 Message-ID: <1408466393.2473.86.camel@surprise> Subject: Re: [PATCH 016/236] BND_TO scaffolding From: David Malcolm To: Jeff Law Cc: gcc-patches@gcc.gnu.org Date: Tue, 19 Aug 2014 16:43:00 -0000 In-Reply-To: <53EA85A0.7060506@redhat.com> References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> <1407345815-14551-17-git-send-email-dmalcolm@redhat.com> <53EA85A0.7060506@redhat.com> Content-Type: multipart/mixed; boundary="=-NeKCmlW2Wa0uul/IZ84h" Mime-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg01908.txt.bz2 --=-NeKCmlW2Wa0uul/IZ84h Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-length: 1203 On Tue, 2014-08-12 at 15:22 -0600, Jeff Law wrote: > On 08/06/14 11:19, David Malcolm wrote: > > gcc/ > > * sel-sched-ir.h (BND_TO): insn_t will eventually be an > > rtx_insn *. To help with transition, for now, convert from an > > access macro into a pair of functions: BND_TO, returning an > > rtx_insn *, and... > > (SET_BND_TO): New function, for use where BND_TO is used as an > > lvalue. > > > > * sel-sched-ir.c (blist_add): Update lvalue usage of BND_TO to > > SET_BND_TO. > > (BND_TO): New function, adding a checked cast. > > (SET_BND_TO): New function. > > > > * sel-sched.c (move_cond_jump): Update lvalue usage of BND_TO to > > SET_BND_TO. > > (compute_av_set_on_boundaries): Likewise. > > > > / > > * rtx-classes-status.txt: Add SET_BND_TO > OK. Thanks. Fixed up the as_a_nullable to safe_as_a, and committed to trunk as r214170, having verified bootstrap®rtest on x86_64-unknown-linux-gnu (Fedora 20) albeit in combination with patches 9-29 [1], and verified that it builds standalone with 9 targets. Am attaching what I committed. FWIW these functions become a macro again in patch #173. Dave [1] as per https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01420.html --=-NeKCmlW2Wa0uul/IZ84h Content-Disposition: attachment; filename="r214170.patch" Content-Type: text/x-patch; name="r214170.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-length: 3414 Index: ChangeLog =================================================================== --- ChangeLog (revision 214169) +++ ChangeLog (revision 214170) @@ -1,5 +1,9 @@ 2014-08-19 David Malcolm + * rtx-classes-status.txt (TODO): Add SET_BND_TO + +2014-08-19 David Malcolm + * rtx-classes-status.txt (TODO): Add SET_BB_NOTE_LIST. 2014-08-19 David Malcolm Index: rtx-classes-status.txt =================================================================== --- rtx-classes-status.txt (revision 214169) +++ rtx-classes-status.txt (revision 214170) @@ -17,6 +17,7 @@ * DF_REF_INSN * SET_BB_HEAD, SET_BB_END, SET_BB_HEADER, SET_BB_FOOTER * SET_BB_NOTE_LIST +* SET_BND_TO * SET_DEP_PRO, SET_DEP_CON * SET_NEXT_INSN, SET_PREV_INSN * SET_VINSN_INSN_RTX Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 214169) +++ gcc/ChangeLog (revision 214170) @@ -1,3 +1,21 @@ +2014-08-19 David Malcolm + + * sel-sched-ir.h (BND_TO): insn_t will eventually be an + rtx_insn *. To help with transition, for now, convert from an + access macro into a pair of functions: BND_TO, returning an + rtx_insn *, and... + (SET_BND_TO): New function, for use where BND_TO is used as an + lvalue. + + * sel-sched-ir.c (blist_add): Update lvalue usage of BND_TO to + SET_BND_TO. + (BND_TO): New function, adding a checked cast. + (SET_BND_TO): New function. + + * sel-sched.c (move_cond_jump): Update lvalue usage of BND_TO to + SET_BND_TO. + (compute_av_set_on_boundaries): Likewise. + 2014-08-19 H.J. Lu * config/i386/i386.md (*ctz2_falsedep_1): Don't clear Index: gcc/sel-sched.c =================================================================== --- gcc/sel-sched.c (revision 214169) +++ gcc/sel-sched.c (revision 214170) @@ -4954,7 +4954,7 @@ /* Jump is moved to the boundary. */ next = PREV_INSN (insn); - BND_TO (bnd) = insn; + SET_BND_TO (bnd) = insn; ft_edge = find_fallthru_edge_from (block_from); block_next = ft_edge->dest; @@ -5095,7 +5095,7 @@ { gcc_assert (FENCE_INSN (fence) == BND_TO (bnd)); FENCE_INSN (fence) = bnd_to; - BND_TO (bnd) = bnd_to; + SET_BND_TO (bnd) = bnd_to; } av_set_clear (&BND_AV (bnd)); Index: gcc/sel-sched-ir.c =================================================================== --- gcc/sel-sched-ir.c (revision 214169) +++ gcc/sel-sched-ir.c (revision 214170) @@ -207,7 +207,7 @@ _list_add (lp); bnd = BLIST_BND (*lp); - BND_TO (bnd) = to; + SET_BND_TO (bnd) = to; BND_PTR (bnd) = ptr; BND_AV (bnd) = NULL; BND_AV1 (bnd) = NULL; @@ -6463,4 +6463,14 @@ return SEL_REGION_BB_INFO (bb)->note_list; } +rtx_insn *BND_TO (bnd_t bnd) +{ + return safe_as_a (bnd->to); +} + +insn_t& SET_BND_TO (bnd_t bnd) +{ + return bnd->to; +} + #endif Index: gcc/sel-sched-ir.h =================================================================== --- gcc/sel-sched-ir.h (revision 214169) +++ gcc/sel-sched-ir.h (revision 214170) @@ -233,7 +233,8 @@ deps_t dc; }; typedef struct _bnd *bnd_t; -#define BND_TO(B) ((B)->to) +extern rtx_insn *BND_TO (bnd_t bnd); +extern insn_t& SET_BND_TO (bnd_t bnd); /* PTR stands not for pointer as you might think, but as a Path To Root of the current instruction group from boundary B. */ --=-NeKCmlW2Wa0uul/IZ84h--