+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>
* tree.h (TREE_THIS_VOLATILE): Document the effect on a
/* The only conditionals that we may be able to compute statically
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)
{
unsigned i;
/* If OP is a constant that has overflowed, do not value number
this expression. */
- if (TREE_CODE_CLASS (TREE_CODE (op)) == tcc_constant
+ if (CONSTANT_CLASS_P (op)
&& TREE_OVERFLOW (op))
{
pool_free (pool, vexpr);
}
/* 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);
op = tempop ? tempop : op;
return (!TREE_THIS_VOLATILE (rhs)
&& (DECL_P (rhs)
- || TREE_CODE_CLASS (TREE_CODE (rhs)) == tcc_reference));
+ || REFERENCE_CLASS_P (rhs)));
}
return (!TREE_THIS_VOLATILE (lhs)
&& (DECL_P (lhs)
- || TREE_CODE_CLASS (TREE_CODE (lhs)) == tcc_reference));
+ || REFERENCE_CLASS_P (lhs)));
}
{
tree lhs, rhs;
- if (TREE_CODE_CLASS (TREE_CODE (cond)) != tcc_comparison)
+ if (!COMPARISON_CLASS_P (cond))
return false;
lhs = TREE_OPERAND (cond, 0);
var = ASSERT_EXPR_VAR (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. */
limit = get_opposite_operand (cond, var);
gcc_assert (TREE_CODE (v) == SSA_NAME);
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
conditional is an EQ_EXPR (V == Z), just build the assignment
static inline bool
fp_predicate (tree expr)
{
- return TREE_CODE_CLASS (TREE_CODE (expr)) == tcc_comparison
- && FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 0)));
+ return (COMPARISON_CLASS_P (expr)
+ && FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 0))));
}
tree t1, t2;
/* 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
of OTHER_COND.