Commit a6234684 by Kazu Hirata Committed by Kazu Hirata

tree-cfg.c (verify_expr): Replace TREE_OPERAND with COND_EXPR_COND.

	* 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.

From-SVN: r90703
parent 88f862a9
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.
......
......@@ -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");
......
......@@ -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))
......
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment