]> gcc.gnu.org Git - gcc.git/commitdiff
c-common.c, [...]: Replace uses of first_rtl_op with TREE_CODE_LENGTH.
authorKazu Hirata <kazu@cs.umass.edu>
Tue, 7 Dec 2004 21:23:10 +0000 (21:23 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Tue, 7 Dec 2004 21:23:10 +0000 (21:23 +0000)
gcc/
* c-common.c, expr.c, fold-const.c, print-tree.c,
tree-gimple.c, tree-inline.c, tree-pretty-print.c,
tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c: Replace uses of
first_rtl_op with TREE_CODE_LENGTH.
* tree.c (first_rtl_op): Remove.
Replace uses of first_rtl_op with TREE_CODE_LENGTH.
* tree.h: Remove the prototype for first_rtl_op.

gcc/cp/
* pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.

From-SVN: r91818

14 files changed:
gcc/ChangeLog
gcc/c-common.c
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/expr.c
gcc/fold-const.c
gcc/print-tree.c
gcc/tree-gimple.c
gcc/tree-inline.c
gcc/tree-pretty-print.c
gcc/tree-ssa-loop-im.c
gcc/tree-ssa-loop-ivopts.c
gcc/tree.c
gcc/tree.h

index c9276399fcfa5798a6f0c9eec7f23d1ea201c33b..338cc630c5c0f29a946b57923718f6b32187af59 100644 (file)
@@ -1,3 +1,13 @@
+2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * c-common.c, expr.c, fold-const.c, print-tree.c,
+       tree-gimple.c, tree-inline.c, tree-pretty-print.c,
+       tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c: Replace uses of
+       first_rtl_op with TREE_CODE_LENGTH.
+       * tree.c (first_rtl_op): Remove.
+       Replace uses of first_rtl_op with TREE_CODE_LENGTH.
+       * tree.h: Remove the prototype for first_rtl_op.
+
 2004-12-07  David Edelsohn  <edelsohn@gnu.org>
 
        * config/rs6000/t-aix43, config/rs6000/t-aix52 (SHLIB_LINK):
index 62aaa27b16b5243788b52a143e92af69e9a448f4..627911d4b68dc2a44a1780b6f2e5bc7414262aa8 100644 (file)
@@ -1365,7 +1365,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
         Other non-expressions need not be processed.  */
       if (cl == tcc_unary)
        {
-         if (first_rtl_op (code) == 0)
+         if (TREE_CODE_LENGTH (code) == 0)
            return;
          x = TREE_OPERAND (x, 0);
          writer = 0;
@@ -1374,7 +1374,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
       else if (IS_EXPR_CODE_CLASS (cl))
        {
          int lp;
-         int max = first_rtl_op (TREE_CODE (x));
+         int max = TREE_CODE_LENGTH (TREE_CODE (x));
          for (lp = 0; lp < max; lp++)
            {
              tmp_before = tmp_nosp = 0;
index dd41800eb078ee01263058c490bba1c44dca2c51..16c854cc1a5bb25e0f6893cefb9115cfee62f49b 100644 (file)
@@ -1,3 +1,7 @@
+2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
+
 2004-12-07  Roger Sayle  <roger@eyesopen.com>
 
        * name-lookup.c (leave_scope): We only need to update
index 2a1a5b330484ec293f6b150c09093725b9091250..9bf396bf465f765fceff71ced6ae26a9c0fa1126 100644 (file)
@@ -12010,7 +12010,7 @@ value_dependent_expression_p (tree expression)
        case tcc_expression:
          {
            int i;
-           for (i = 0; i < first_rtl_op (TREE_CODE (expression)); ++i)
+           for (i = 0; i < TREE_CODE_LENGTH (TREE_CODE (expression)); ++i)
              /* In some cases, some of the operands may be missing.
                 (For example, in the case of PREDECREMENT_EXPR, the
                 amount to increment by may be missing.)  That doesn't
index 44b3c4a9fdf90341a97faf928d4bd4a60cca9bee..d594671658e602c8fcd1638be983c25a2d0a9d34 100644 (file)
@@ -5944,7 +5944,7 @@ safe_from_p (rtx x, tree exp, int top_p)
       if (exp_rtl)
        break;
 
-      nops = first_rtl_op (TREE_CODE (exp));
+      nops = TREE_CODE_LENGTH (TREE_CODE (exp));
       for (i = 0; i < nops; i++)
        if (TREE_OPERAND (exp, i) != 0
            && ! safe_from_p (x, TREE_OPERAND (exp, i), 0))
index 8ddb039c52f3d69b7b2a8bcfa0e722d602566bd6..878cbd9a2d883b169e041166f13f8001b0fda472 100644 (file)
@@ -3550,7 +3550,7 @@ make_range (tree exp, int *pin_p, tree *plow, tree *phigh)
 
       if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code)))
        {
-         if (first_rtl_op (code) > 0)
+         if (TREE_CODE_LENGTH (code) > 0)
            arg0 = TREE_OPERAND (exp, 0);
          if (TREE_CODE_CLASS (code) == tcc_comparison
              || TREE_CODE_CLASS (code) == tcc_unary
@@ -6277,7 +6277,7 @@ fold (tree expr)
     }
   else if (IS_EXPR_CODE_CLASS (kind))
     {
-      int len = first_rtl_op (code);
+      int len = TREE_CODE_LENGTH (code);
       int i;
       for (i = 0; i < len; i++)
        {
@@ -9418,7 +9418,7 @@ fold_checksum_tree (tree expr, struct md5_ctx *ctx, htab_t ht)
     case tcc_unary:
     case tcc_binary:
     case tcc_statement:
-      len = first_rtl_op (code);
+      len = TREE_CODE_LENGTH (code);
       for (i = 0; i < len; ++i)
        fold_checksum_tree (TREE_OPERAND (expr, i), ctx, ht);
       break;
index 20822af24b1bf388349d17500f5d3fbc91f28a77..f47d21ab623d454265930a48764197419ecdd812 100644 (file)
@@ -593,7 +593,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
 
       /* Some nodes contain rtx's, not trees,
         after a certain point.  Print the rtx's as rtx's.  */
-      first_rtl = first_rtl_op (TREE_CODE (node));
+      first_rtl = TREE_CODE_LENGTH (TREE_CODE (node));
 
       for (i = 0; i < len; i++)
        {
index 0d52611f86736f045ce8ef8fd09edeccebf70c0c..e1cbc334c925b8ab66fe2002e77fbd70dfac0e95 100644 (file)
@@ -443,7 +443,7 @@ void
 recalculate_side_effects (tree t)
 {
   enum tree_code code = TREE_CODE (t);
-  int fro = first_rtl_op (code);
+  int fro = TREE_CODE_LENGTH (code);
   int i;
 
   switch (TREE_CODE_CLASS (code))
index 218764996f04006976a2b714552683e8c708354e..0c72fe662e5d20d56d3e5b1db0cd486403c4b4ae 100644 (file)
@@ -1391,7 +1391,7 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data)
   if (TREE_CODE (*tp) == TARGET_EXPR)
     {
 #if 0
-      int i, len = first_rtl_op (TARGET_EXPR);
+      int i, len = TREE_CODE_LENGTH (TARGET_EXPR);
 
       /* We're walking our own subtrees.  */
       *walk_subtrees = 0;
@@ -2088,7 +2088,7 @@ walk_tree (tree *tp, walk_tree_fn func, void *data, struct pointer_set_t *pset)
       int i, len;
 
       /* Walk over all the sub-trees of this operand.  */
-      len = first_rtl_op (code);
+      len = TREE_CODE_LENGTH (code);
       /* TARGET_EXPRs are peculiar: operands 1 and 3 can be the same.
         But, we only want to walk once.  */
       if (code == TARGET_EXPR
index e1e0c63db50f88ee222a3d8beef73d637e7d4ca7..ce19f5fcf8930c733733ade4e826f0dc60cdb33f 100644 (file)
@@ -72,7 +72,7 @@ do_niy (pretty_printer *buffer, tree node)
 
   if (EXPR_P (node))
     {
-      len = first_rtl_op (TREE_CODE (node));
+      len = TREE_CODE_LENGTH (TREE_CODE (node));
       for (i = 0; i < len; ++i)
        {
          newline_and_indent (buffer, 2);
index a53fd53a20932d88fc794ed0adc5b37932bfeb29..16e477c9cc508168eb69a5d15070eccb531e0e8d 100644 (file)
@@ -283,7 +283,7 @@ outermost_invariant_loop_expr (tree expr, struct loop *loop)
       && class != tcc_comparison)
     return NULL;
 
-  nops = first_rtl_op (TREE_CODE (expr));
+  nops = TREE_CODE_LENGTH (TREE_CODE (expr));
   for (i = 0; i < nops; i++)
     {
       aloop = outermost_invariant_loop_expr (TREE_OPERAND (expr, i), loop);
@@ -743,7 +743,7 @@ force_move_till_expr (tree expr, struct loop *orig_loop, struct loop *loop)
       && class != tcc_comparison)
     return;
 
-  nops = first_rtl_op (TREE_CODE (expr));
+  nops = TREE_CODE_LENGTH (TREE_CODE (expr));
   for (i = 0; i < nops; i++)
     force_move_till_expr (TREE_OPERAND (expr, i), orig_loop, loop);
 }
index a08923b9636081ef3cb3a99de61d3e48e8ff927d..8727db86314486de13510b87e9911c2f10dbfb4c 100644 (file)
@@ -1270,7 +1270,7 @@ expr_invariant_in_loop_p (struct loop *loop, tree expr)
   if (!EXPR_P (expr))
     return false;
 
-  len = first_rtl_op (TREE_CODE (expr));
+  len = TREE_CODE_LENGTH (TREE_CODE (expr));
   for (i = 0; i < len; i++)
     if (!expr_invariant_in_loop_p (loop, TREE_OPERAND (expr, i)))
       return false;
index 843410bf07bddb0fe210b7bab3ab160ecb8bba30..0ff686cd4af67888577f1ac87d82a332a193dc91 100644 (file)
@@ -1734,19 +1734,6 @@ skip_simple_arithmetic (tree expr)
   return inner;
 }
 
-/* Returns the index of the first non-tree operand for CODE, or the number
-   of operands if all are trees.  */
-
-int
-first_rtl_op (enum tree_code code)
-{
-  switch (code)
-    {
-    default:
-      return TREE_CODE_LENGTH (code);
-    }
-}
-
 /* Return which tree structure is used by T.  */
 
 enum tree_node_structure_enum
@@ -1845,7 +1832,7 @@ contains_placeholder_p (tree exp)
          break;
        }
 
-      switch (first_rtl_op (code))
+      switch (TREE_CODE_LENGTH (code))
        {
        case 1:
          return CONTAINS_PLACEHOLDER_P (TREE_OPERAND (exp, 0));
@@ -2012,7 +1999,7 @@ substitute_in_expr (tree exp, tree f, tree r)
       case tcc_comparison:
       case tcc_expression:
       case tcc_reference:
-       switch (first_rtl_op (code))
+       switch (TREE_CODE_LENGTH (code))
          {
          case 0:
            return exp;
@@ -2132,7 +2119,7 @@ substitute_placeholder_in_expr (tree exp, tree obj)
       case tcc_expression:
       case tcc_reference:
       case tcc_statement:
-       switch (first_rtl_op (code))
+       switch (TREE_CODE_LENGTH (code))
          {
          case 0:
            return exp;
@@ -2508,7 +2495,7 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL)
   TREE_COMPLEXITY (t) = 0;
   TREE_OPERAND (t, 0) = node;
   TREE_BLOCK (t) = NULL_TREE;
-  if (node && !TYPE_P (node) && first_rtl_op (code) != 0)
+  if (node && !TYPE_P (node) && TREE_CODE_LENGTH (code) != 0)
     {
       TREE_SIDE_EFFECTS (t) = TREE_SIDE_EFFECTS (node);
       TREE_READONLY (t) = TREE_READONLY (node);
@@ -2593,7 +2580,7 @@ build2_stat (enum tree_code code, tree tt, tree arg0, tree arg1 MEM_STAT_DECL)
      result based on those same flags for the arguments.  But if the
      arguments aren't really even `tree' expressions, we shouldn't be trying
      to do this.  */
-  fro = first_rtl_op (code);
+  fro = TREE_CODE_LENGTH (code);
 
   /* Expressions without side effects may be constant if their
      arguments are as well.  */
@@ -2630,7 +2617,7 @@ build3_stat (enum tree_code code, tree tt, tree arg0, tree arg1,
   t = make_node_stat (code PASS_MEM_STAT);
   TREE_TYPE (t) = tt;
 
-  fro = first_rtl_op (code);
+  fro = TREE_CODE_LENGTH (code);
 
   side_effects = TREE_SIDE_EFFECTS (t);
 
@@ -2679,7 +2666,7 @@ build4_stat (enum tree_code code, tree tt, tree arg0, tree arg1,
   t = make_node_stat (code PASS_MEM_STAT);
   TREE_TYPE (t) = tt;
 
-  fro = first_rtl_op (code);
+  fro = TREE_CODE_LENGTH (code);
 
   side_effects = TREE_SIDE_EFFECTS (t);
 
@@ -4196,7 +4183,7 @@ iterative_hash_expr (tree t, hashval_t val)
              val = iterative_hash_hashval_t (two, val);
            }
          else
-           for (i = first_rtl_op (code) - 1; i >= 0; --i)
+           for (i = TREE_CODE_LENGTH (code) - 1; i >= 0; --i)
              val = iterative_hash_expr (TREE_OPERAND (t, i), val);
        }
       return val;
index a6963796c312408041df8a37f19ea24d0e53e82b..aec7b4b99e9d7ce2e9426d61f1f7757d1333f3cd 100644 (file)
@@ -3279,11 +3279,6 @@ extern tree save_expr (tree);
 
 extern tree skip_simple_arithmetic (tree);
 
-/* Returns the index of the first non-tree operand for CODE, or the number
-   of operands if all are trees.  */
-
-extern int first_rtl_op (enum tree_code);
-
 /* Return which tree structure is used by T.  */
 
 enum tree_node_structure_enum tree_node_structure (tree);
This page took 0.121773 seconds and 5 git commands to generate.