From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8471 invoked by alias); 11 Mar 2011 13:19:22 -0000 Received: (qmail 8461 invoked by uid 22791); 11 Mar 2011 13:19:21 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Mar 2011 13:19:15 +0000 Received: by iwn10 with SMTP id 10so2946922iwn.20 for ; Fri, 11 Mar 2011 05:19:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.168.196 with SMTP id x4mr2338548icy.14.1299849554281; Fri, 11 Mar 2011 05:19:14 -0800 (PST) Received: by 10.231.10.130 with HTTP; Fri, 11 Mar 2011 05:19:14 -0800 (PST) In-Reply-To: <1299817406-16745-13-git-send-email-froydnj@codesourcery.com> References: <1299817406-16745-1-git-send-email-froydnj@codesourcery.com> <1299817406-16745-13-git-send-email-froydnj@codesourcery.com> Date: Fri, 11 Mar 2011 13:19:00 -0000 Message-ID: Subject: Re: [PATCH 12/18] make CASE_LABEL_EXPR not abuse TREE_CHAIN From: Richard Guenther To: Nathan Froyd Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2011-03/txt/msg00600.txt.bz2 On Fri, Mar 11, 2011 at 5:23 AM, Nathan Froyd wr= ote: > Move CASE_CHAIN into a local operand for CASE_LABEL_EXPR. =A0Nothing to > see here. I wonder if there isn't a better way to do this ... like always requiring operand 2 of SWITCH_EXPRs. Richard. > -Nathan > > gcc/ > =A0 =A0 =A0 =A0* tree.def (CASE_LABEL_EXPR): Add an operand. > =A0 =A0 =A0 =A0* tree.h (CASE_CHAIN): Use TREE_OPERAND instead of TREE_CH= AIN. > > diff --git a/gcc/tree.def b/gcc/tree.def > index eb94ad2..9c6606d 100644 > --- a/gcc/tree.def > +++ b/gcc/tree.def > @@ -863,7 +863,7 @@ DEFTREECODE (SWITCH_EXPR, "switch_expr", tcc_statemen= t, 3) > =A0 =A0CASE_HIGH, respectively. If CASE_LOW is NULL_TREE, the label is a > =A0 =A0'default' label. If CASE_HIGH is NULL_TREE, the label is a normal = case > =A0 =A0label. =A0CASE_LABEL is the corresponding LABEL_DECL. =A0*/ > -DEFTREECODE (CASE_LABEL_EXPR, "case_label_expr", tcc_statement, 3) > +DEFTREECODE (CASE_LABEL_EXPR, "case_label_expr", tcc_statement, 4) > > =A0/* Used to represent an inline assembly statement. =A0ASM_STRING retur= ns a > =A0 =A0STRING_CST for the instruction (e.g., "mov x, y"). ASM_OUTPUTS, > diff --git a/gcc/tree.h b/gcc/tree.h > index 3e1ff2c..c81186a 100644 > --- a/gcc/tree.h > +++ b/gcc/tree.h > @@ -1689,7 +1689,7 @@ extern void protected_set_expr_location (tree, loca= tion_t); > =A0#define CASE_LOW(NODE) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 TREE_OPERAND (C= ASE_LABEL_EXPR_CHECK (NODE), 0) > =A0#define CASE_HIGH(NODE) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TREE_OPERAND (C= ASE_LABEL_EXPR_CHECK (NODE), 1) > =A0#define CASE_LABEL(NODE) =A0 =A0 =A0 =A0 =A0 =A0 =A0 TREE_OPERAND (CAS= E_LABEL_EXPR_CHECK (NODE), 2) > -#define CASE_CHAIN(NODE) =A0 =A0 =A0 =A0 =A0 =A0 =A0 TREE_CHAIN (CASE_LA= BEL_EXPR_CHECK (NODE)) > +#define CASE_CHAIN(NODE) =A0 =A0 =A0 =A0 =A0 =A0 =A0 TREE_OPERAND (CASE_= LABEL_EXPR_CHECK (NODE), 3) > > =A0/* The operands of a TARGET_MEM_REF. =A0Operands 0 and 1 have to match > =A0 =A0corresponding MEM_REF operands. =A0*/ > -- > 1.7.0.4 > >