Commit 7da4bf7d by Kazu Hirata Committed by Kazu Hirata

tree-ssa-copy.c (copy_prop_visit_cond_stmt): Use COMPARISON_CLASS_P.

	* tree-ssa-copy.c (copy_prop_visit_cond_stmt): Use
	COMPARISON_CLASS_P.
	* tree-ssa-pre.c (create_value_expr_from): Use
	CONSTANT_CLASS_P and REFERENCE_CLASS_P.
	* tree-ssa-propagate.c (stmt_makes_single_load,
	stmt_makes_single_store): Use REFERENCE_CLASS_P.
	* tree-vect-transform.c (vect_is_simple_cond): Use
	COMPARISON_CLASS_P.
	* tree-vrp.c (extract_range_from_assert,
	build_assert_expr_for, fp_predicate, has_assert_expr): Use
	COMPARISON_CLASS_P.

From-SVN: r98664
parent d29f81b6
2005-04-24 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-copy.c (copy_prop_visit_cond_stmt): Use
COMPARISON_CLASS_P.
* tree-ssa-pre.c (create_value_expr_from): Use
CONSTANT_CLASS_P and REFERENCE_CLASS_P.
* tree-ssa-propagate.c (stmt_makes_single_load,
stmt_makes_single_store): Use REFERENCE_CLASS_P.
* tree-vect-transform.c (vect_is_simple_cond): Use
COMPARISON_CLASS_P.
* tree-vrp.c (extract_range_from_assert,
build_assert_expr_for, fp_predicate, has_assert_expr): Use
COMPARISON_CLASS_P.
2005-04-24 Andrew Pinski <pinskia@physics.uc.edu> 2005-04-24 Andrew Pinski <pinskia@physics.uc.edu>
* tree.h (TREE_THIS_VOLATILE): Document the effect on a * tree.h (TREE_THIS_VOLATILE): Document the effect on a
......
...@@ -604,7 +604,7 @@ copy_prop_visit_cond_stmt (tree stmt, edge *taken_edge_p) ...@@ -604,7 +604,7 @@ copy_prop_visit_cond_stmt (tree stmt, edge *taken_edge_p)
/* The only conditionals that we may be able to compute statically /* The only conditionals that we may be able to compute statically
are predicates involving at least one SSA_NAME. */ are predicates involving at least one SSA_NAME. */
if (TREE_CODE_CLASS (TREE_CODE (cond)) == tcc_comparison if (COMPARISON_CLASS_P (cond)
&& NUM_USES (uses) >= 1) && NUM_USES (uses) >= 1)
{ {
unsigned i; unsigned i;
......
...@@ -1851,7 +1851,7 @@ create_value_expr_from (tree expr, basic_block block, ...@@ -1851,7 +1851,7 @@ create_value_expr_from (tree expr, basic_block block,
/* If OP is a constant that has overflowed, do not value number /* If OP is a constant that has overflowed, do not value number
this expression. */ this expression. */
if (TREE_CODE_CLASS (TREE_CODE (op)) == tcc_constant if (CONSTANT_CLASS_P (op)
&& TREE_OVERFLOW (op)) && TREE_OVERFLOW (op))
{ {
pool_free (pool, vexpr); pool_free (pool, vexpr);
...@@ -1859,7 +1859,7 @@ create_value_expr_from (tree expr, basic_block block, ...@@ -1859,7 +1859,7 @@ create_value_expr_from (tree expr, basic_block block,
} }
/* Recursively value-numberize reference ops */ /* Recursively value-numberize reference ops */
if (TREE_CODE_CLASS (TREE_CODE (op)) == tcc_reference) if (REFERENCE_CLASS_P (op))
{ {
tree tempop = create_value_expr_from (op, block, vuses); tree tempop = create_value_expr_from (op, block, vuses);
op = tempop ? tempop : op; op = tempop ? tempop : op;
......
...@@ -709,7 +709,7 @@ stmt_makes_single_load (tree stmt) ...@@ -709,7 +709,7 @@ stmt_makes_single_load (tree stmt)
return (!TREE_THIS_VOLATILE (rhs) return (!TREE_THIS_VOLATILE (rhs)
&& (DECL_P (rhs) && (DECL_P (rhs)
|| TREE_CODE_CLASS (TREE_CODE (rhs)) == tcc_reference)); || REFERENCE_CLASS_P (rhs)));
} }
...@@ -735,7 +735,7 @@ stmt_makes_single_store (tree stmt) ...@@ -735,7 +735,7 @@ stmt_makes_single_store (tree stmt)
return (!TREE_THIS_VOLATILE (lhs) return (!TREE_THIS_VOLATILE (lhs)
&& (DECL_P (lhs) && (DECL_P (lhs)
|| TREE_CODE_CLASS (TREE_CODE (lhs)) == tcc_reference)); || REFERENCE_CLASS_P (lhs)));
} }
......
...@@ -1151,7 +1151,7 @@ vect_is_simple_cond (tree cond, loop_vec_info loop_vinfo) ...@@ -1151,7 +1151,7 @@ vect_is_simple_cond (tree cond, loop_vec_info loop_vinfo)
{ {
tree lhs, rhs; tree lhs, rhs;
if (TREE_CODE_CLASS (TREE_CODE (cond)) != tcc_comparison) if (!COMPARISON_CLASS_P (cond))
return false; return false;
lhs = TREE_OPERAND (cond, 0); lhs = TREE_OPERAND (cond, 0);
......
...@@ -481,7 +481,7 @@ extract_range_from_assert (value_range *vr_p, tree expr) ...@@ -481,7 +481,7 @@ extract_range_from_assert (value_range *vr_p, tree expr)
var = ASSERT_EXPR_VAR (expr); var = ASSERT_EXPR_VAR (expr);
cond = ASSERT_EXPR_COND (expr); cond = ASSERT_EXPR_COND (expr);
gcc_assert (TREE_CODE_CLASS (TREE_CODE (cond)) == tcc_comparison); gcc_assert (COMPARISON_CLASS_P (cond));
/* Find VAR in the ASSERT_EXPR conditional. */ /* Find VAR in the ASSERT_EXPR conditional. */
limit = get_opposite_operand (cond, var); limit = get_opposite_operand (cond, var);
...@@ -1228,7 +1228,7 @@ build_assert_expr_for (tree cond, tree v) ...@@ -1228,7 +1228,7 @@ build_assert_expr_for (tree cond, tree v)
gcc_assert (TREE_CODE (v) == SSA_NAME); gcc_assert (TREE_CODE (v) == SSA_NAME);
n = duplicate_ssa_name (v, NULL_TREE); n = duplicate_ssa_name (v, NULL_TREE);
if (TREE_CODE_CLASS (TREE_CODE (cond)) == tcc_comparison) if (COMPARISON_CLASS_P (cond))
{ {
/* Build N = ASSERT_EXPR <V, COND>. As a special case, if the /* Build N = ASSERT_EXPR <V, COND>. As a special case, if the
conditional is an EQ_EXPR (V == Z), just build the assignment conditional is an EQ_EXPR (V == Z), just build the assignment
...@@ -1276,8 +1276,8 @@ build_assert_expr_for (tree cond, tree v) ...@@ -1276,8 +1276,8 @@ build_assert_expr_for (tree cond, tree v)
static inline bool static inline bool
fp_predicate (tree expr) fp_predicate (tree expr)
{ {
return TREE_CODE_CLASS (TREE_CODE (expr)) == tcc_comparison return (COMPARISON_CLASS_P (expr)
&& FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 0))); && FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 0))));
} }
...@@ -1335,7 +1335,7 @@ has_assert_expr (tree op, tree cond) ...@@ -1335,7 +1335,7 @@ has_assert_expr (tree op, tree cond)
tree t1, t2; tree t1, t2;
/* If COND is not a comparison predicate, something is wrong. */ /* If COND is not a comparison predicate, something is wrong. */
gcc_assert (TREE_CODE_CLASS (TREE_CODE (cond)) == tcc_comparison); gcc_assert (COMPARISON_CLASS_P (cond));
/* Note that we only need to compare against one of the operands /* Note that we only need to compare against one of the operands
of OTHER_COND. of OTHER_COND.
......
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