+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.
}
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,
}
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);
}
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,
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,
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);