From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17196 invoked by alias); 11 Mar 2011 04:23:49 -0000 Received: (qmail 16890 invoked by uid 22791); 11 Mar 2011 04:23:46 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Mar 2011 04:23:41 +0000 Received: (qmail 1576 invoked from network); 11 Mar 2011 04:23:39 -0000 Received: from unknown (HELO codesourcery.com) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Mar 2011 04:23:39 -0000 From: Nathan Froyd To: gcc-patches@gcc.gnu.org Cc: Nathan Froyd Subject: [PATCH 03/18] remove TREE_CHAIN from *_CST nodes Date: Fri, 11 Mar 2011 04:24:00 -0000 Message-Id: <1299817406-16745-4-git-send-email-froydnj@codesourcery.com> In-Reply-To: <1299817406-16745-1-git-send-email-froydnj@codesourcery.com> References: <1299817406-16745-1-git-send-email-froydnj@codesourcery.com> 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/msg00558.txt.bz2 *_CST nodes don't need TREE_CHAIN. Make them include typed_tree instead, mark them as such in initialize_tree_contains_struct, and don't print out their TREE_CHAIN. -Nathan gcc/ * tree.h (struct tree_int_cst, struct real_value): Include typed_tree instead of tree_common. (struct tree_fixed_cst, struct tree_string, struct tree_complex): Likewise. * tree.c (initialize_tree_contains_struct): Mark such nodes as being TS_TYPED rather than TS_COMMON. * print-tree.c (print_node): Don't print TREE_CHAIN for constants. diff --git a/gcc/print-tree.c b/gcc/print-tree.c index b0c6899..3b5edeb 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -853,11 +853,6 @@ print_node (FILE *file, const char *prefix, tree node, int indent) } fputc ('\"', file); } - /* Print the chain at second level. */ - if (indent == 4) - print_node (file, "chain", TREE_CHAIN (node), indent + 4); - else - print_node_brief (file, "chain", TREE_CHAIN (node), indent + 4); break; case IDENTIFIER_NODE: diff --git a/gcc/tree.c b/gcc/tree.c index 68f40c9..7d73c74 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -370,15 +370,15 @@ initialize_tree_contains_struct (void) break; case TS_COMMON: - MARK_TS_TYPED (code); - break; - case TS_INT_CST: case TS_REAL_CST: case TS_FIXED_CST: case TS_VECTOR: case TS_STRING: case TS_COMPLEX: + MARK_TS_TYPED (code); + break; + case TS_IDENTIFIER: case TS_DECL_MINIMAL: case TS_TYPE: diff --git a/gcc/tree.h b/gcc/tree.h index 4ad2d3e..11c2f83 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1456,7 +1456,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B))) struct GTY(()) tree_int_cst { - struct tree_common common; + struct typed_tree typed; double_int int_cst; }; @@ -1469,7 +1469,7 @@ struct real_value; #define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE)) struct GTY(()) tree_real_cst { - struct tree_common common; + struct typed_tree typed; struct real_value * real_cst_ptr; }; @@ -1481,7 +1481,7 @@ struct fixed_value; #define TREE_FIXED_CST(NODE) (*TREE_FIXED_CST_PTR (NODE)) struct GTY(()) tree_fixed_cst { - struct tree_common common; + struct typed_tree typed; struct fixed_value * fixed_cst_ptr; }; @@ -1491,7 +1491,7 @@ struct GTY(()) tree_fixed_cst { ((const char *)(STRING_CST_CHECK (NODE)->string.str)) struct GTY(()) tree_string { - struct tree_common common; + struct typed_tree typed; int length; char str[1]; }; @@ -1501,7 +1501,7 @@ struct GTY(()) tree_string { #define TREE_IMAGPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.imag) struct GTY(()) tree_complex { - struct tree_common common; + struct typed_tree typed; tree real; tree imag; }; @@ -1510,7 +1510,7 @@ struct GTY(()) tree_complex { #define TREE_VECTOR_CST_ELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.elements) struct GTY(()) tree_vector { - struct tree_common common; + struct typed_tree typed; tree elements; }; -- 1.7.0.4