OSDN Git Service

* tree-cfg.c (verify_expr): Replace TREE_OPERAND with
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Nov 2004 00:05:30 +0000 (00:05 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Nov 2004 00:05:30 +0000 (00:05 +0000)
COND_EXPR_COND.
* tree-if-conv.c (tree_if_convert_cond_expr): Likewise.
* tree-ssa-dom.c (thread_across_edge): Likewise.
* tree-vectorizer.c (vect_transform_loop_bound): Replace
TREE_OPERAND with COND_EXPR_COND, COND_EXPR_THEN, or
COND_EXPR_ELSE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90703 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-cfg.c
gcc/tree-if-conv.c
gcc/tree-ssa-dom.c
gcc/tree-vectorizer.c

index a50706d..2f20dbf 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-16  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tree-cfg.c (verify_expr): Replace TREE_OPERAND with
+       COND_EXPR_COND.
+       * tree-if-conv.c (tree_if_convert_cond_expr): Likewise.
+       * tree-ssa-dom.c (thread_across_edge): Likewise.
+       * tree-vectorizer.c (vect_transform_loop_bound): Replace
+       TREE_OPERAND with COND_EXPR_COND, COND_EXPR_THEN, or
+       COND_EXPR_ELSE.
+
 2004-11-15  Eric Christopher  <echristo@redhat.com>
 
        * sched-deps.c (set_sched_group_p): Delete.
index b27f872..1ec6fc2 100644 (file)
@@ -3224,7 +3224,7 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
       break;
 
     case COND_EXPR:
-      x = TREE_OPERAND (t, 0);
+      x = COND_EXPR_COND (t);
       if (TREE_CODE (TREE_TYPE (x)) != BOOLEAN_TYPE)
        {
          error ("non-boolean used in condition");
index ce07166..c9bde4e 100644 (file)
@@ -277,7 +277,7 @@ tree_if_convert_cond_expr (struct loop *loop, tree stmt, tree cond,
 
   gcc_assert (TREE_CODE (stmt) == COND_EXPR);
 
-  c = TREE_OPERAND (stmt, 0);
+  c = COND_EXPR_COND (stmt);
 
   /* Create temp. for condition.  */
   if (!is_gimple_condexpr (c))
index 41138d8..e47b3f8 100644 (file)
@@ -730,9 +730,9 @@ thread_across_edge (struct dom_walk_data *walk_data, edge e)
            }
          else
            {
-             TREE_SET_CODE (TREE_OPERAND (dummy_cond, 0), cond_code);
-             TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 0) = op0;
-             TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1) = op1;
+             TREE_SET_CODE (COND_EXPR_COND (dummy_cond), cond_code);
+             TREE_OPERAND (COND_EXPR_COND (dummy_cond), 0) = op0;
+             TREE_OPERAND (COND_EXPR_COND (dummy_cond), 1) = op1;
            }
 
          /* If the conditional folds to an invariant, then we are done,
@@ -1805,9 +1805,9 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
            }
           else
            {
-             TREE_SET_CODE (TREE_OPERAND (dummy_cond, 0), GT_EXPR);
-             TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 0) = op;
-             TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1)
+             TREE_SET_CODE (COND_EXPR_COND (dummy_cond), GT_EXPR);
+             TREE_OPERAND (COND_EXPR_COND (dummy_cond), 0) = op;
+             TREE_OPERAND (COND_EXPR_COND (dummy_cond), 1)
                = integer_zero_node;
            }
          val = simplify_cond_and_lookup_avail_expr (dummy_cond, NULL, false);
@@ -1857,18 +1857,18 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
            }
          else
            {
-             TREE_SET_CODE (TREE_OPERAND (dummy_cond, 0), LE_EXPR);
-             TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 0) = op;
-             TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1)
+             TREE_SET_CODE (COND_EXPR_COND (dummy_cond), LE_EXPR);
+             TREE_OPERAND (COND_EXPR_COND (dummy_cond), 0) = op;
+             TREE_OPERAND (COND_EXPR_COND (dummy_cond), 1)
                = build_int_cst (type, 0);
            }
          val = simplify_cond_and_lookup_avail_expr (dummy_cond, NULL, false);
 
          if (!val)
            {
-             TREE_SET_CODE (TREE_OPERAND (dummy_cond, 0), GE_EXPR);
-             TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 0) = op;
-             TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1)
+             TREE_SET_CODE (COND_EXPR_COND (dummy_cond), GE_EXPR);
+             TREE_OPERAND (COND_EXPR_COND (dummy_cond), 0) = op;
+             TREE_OPERAND (COND_EXPR_COND (dummy_cond), 1)
                = build_int_cst (type, 0);
 
              val = simplify_cond_and_lookup_avail_expr (dummy_cond,
index 14e455d..f258e46 100644 (file)
@@ -2860,7 +2860,7 @@ vect_transform_loop_bound (loop_vec_info loop_vinfo, tree niters)
   gcc_assert (bsi_stmt (loop_exit_bsi) == orig_cond_expr);
 
   /* new loop exit test:  */
-  lb_type = TREE_TYPE (TREE_OPERAND (TREE_OPERAND (orig_cond_expr, 0), 1));
+  lb_type = TREE_TYPE (TREE_OPERAND (COND_EXPR_COND (orig_cond_expr), 1));
   if (!symbol_niters)
     new_loop_bound = fold_convert (lb_type, 
                                   build_int_cst (unsigned_type_node, 
@@ -2876,7 +2876,8 @@ vect_transform_loop_bound (loop_vec_info loop_vinfo, tree niters)
                   indx_after_incr, new_loop_bound);
 
   cond_stmt = build3 (COND_EXPR, TREE_TYPE (orig_cond_expr), cond,
-       TREE_OPERAND (orig_cond_expr, 1), TREE_OPERAND (orig_cond_expr, 2));
+                     COND_EXPR_THEN (orig_cond_expr),
+                     COND_EXPR_ELSE (orig_cond_expr));
 
   bsi_insert_before (&loop_exit_bsi, cond_stmt, BSI_SAME_STMT);