On Fri, 2 Feb 2007, Paolo Bonzini wrote:
> I'd be curious to know the effect of removing the "complexity" field of 
> struct tree_exp.  It should be possible to bootstrap C/C++/Java/Fortran 
> with a two line patch removing the field from tree.h, and the only 
> reference to it in tree.c (via the macro TREE_COMPLEXITY).

You mean, like the patch below?

Doesn't work:

  trunk/gcc/cp/pt.c: In function 'tsubst_expr':
  trunk/gcc/cp/pt.c:8924: error: 'struct tree_exp' has no member named 
'complexity'

Gerald

Index: tree.c
===================================================================
--- tree.c      (revision 121482)
+++ tree.c      (working copy)
@@ -2931,7 +2931,6 @@
 #else
   SET_EXPR_LOCUS (t, NULL);
 #endif
-  TREE_COMPLEXITY (t) = 0;
   TREE_OPERAND (t, 0) = node;
   TREE_BLOCK (t) = NULL_TREE;
   if (node && !TYPE_P (node))
Index: tree.h
===================================================================
--- tree.h      (revision 121482)
+++ tree.h      (working copy)
@@ -1498,7 +1498,6 @@
 
 /* In ordinary expression nodes.  */
 #define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I)
-#define TREE_COMPLEXITY(NODE) (EXPR_CHECK (NODE)->exp.complexity)
 
 /* In gimple statements.  */
 #define GIMPLE_STMT_OPERAND(NODE, I) GIMPLE_STMT_OPERAND_CHECK (NODE, I)
@@ -1724,7 +1723,6 @@
 {
   struct tree_common common;
   source_locus locus;
-  int complexity;
   tree block;
   tree GTY ((special ("tree_exp"),
             desc ("TREE_CODE ((tree) &%0)")))

Reply via email to