tree-ssa-forwprop.c (lookup_logical_inverted_value): Remove TRUTH_*_EXPR handling.
authorRichard Guenther <rguenther@suse.de>
Tue, 19 Jul 2011 15:16:23 +0000 (15:16 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 19 Jul 2011 15:16:23 +0000 (15:16 +0000)
2011-07-19  Richard Guenther  <rguenther@suse.de>

* tree-ssa-forwprop.c (lookup_logical_inverted_value): Remove
TRUTH_*_EXPR handling.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* tree-ssa-pre.c (fully_constant_expression): Likewise.
* tree-ssa-uninit.c (use_pred_not_overlap_with_undef_path_pre):
Likewise.
(is_and_or_or): Likewise.
(is_norm_cond_subset_of): Likewise.

From-SVN: r176463

gcc/ChangeLog
gcc/tree-ssa-forwprop.c
gcc/tree-ssa-operands.c
gcc/tree-ssa-pre.c
gcc/tree-ssa-uninit.c

index d74516c44ce026c9a692af97e79d16dc290e8331..1a1fd346af4365bebb457828a9540635be725665 100644 (file)
@@ -1,3 +1,14 @@
+2011-07-19  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-forwprop.c (lookup_logical_inverted_value): Remove
+       TRUTH_*_EXPR handling.
+       * tree-ssa-operands.c (get_expr_operands): Likewise.
+       * tree-ssa-pre.c (fully_constant_expression): Likewise.
+       * tree-ssa-uninit.c (use_pred_not_overlap_with_undef_path_pre):
+       Likewise.
+       (is_and_or_or): Likewise.
+       (is_norm_cond_subset_of): Likewise.
+
 2011-07-19  Richard Guenther  <rguenther@suse.de>
 
        * tree.h (fold_build_pointer_plus_loc): New helper function.
index 1bbee72b53d7db02ab5b13602ed999257b3c63c7..5a40f5e604ebce0334de4a2aa77981d69be52528 100644 (file)
@@ -1622,16 +1622,13 @@ lookup_logical_inverted_value (tree name)
   op2 = NULL_TREE;
 
   /* Get for EQ_EXPR or BIT_XOR_EXPR operation the second operand.
-     If CODE isn't an EQ_EXPR, BIT_XOR_EXPR, TRUTH_NOT_EXPR,
-     or BIT_NOT_EXPR, then return.  */
+     If CODE isn't an EQ_EXPR, BIT_XOR_EXPR, or BIT_NOT_EXPR, then return.  */
   if (code == EQ_EXPR || code == NE_EXPR
       || code == BIT_XOR_EXPR)
     op2 = gimple_assign_rhs2 (def);
 
   switch (code)
     {
-    case TRUTH_NOT_EXPR:
-      return op1;
     case BIT_NOT_EXPR:
       if (truth_valued_ssa_name (name))
        return op1;
index 7f76cbfe9c090d46ee1cf6dff4d2a5e60f5ca469..995341f0e6986ecfd1b2f001c5c0ddd3ec987957 100644 (file)
@@ -968,15 +968,11 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags)
        gimple_set_has_volatile_ops (stmt, true);
       /* FALLTHRU */
 
-    case TRUTH_NOT_EXPR:
     case VIEW_CONVERT_EXPR:
     do_unary:
       get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags);
       return;
 
-    case TRUTH_AND_EXPR:
-    case TRUTH_OR_EXPR:
-    case TRUTH_XOR_EXPR:
     case COMPOUND_EXPR:
     case OBJ_TYPE_REF:
     case ASSERT_EXPR:
index 7c54d2a074fad253b77605ea3ddf49b927e5b8ac..a50c837db414677463dd83574f722317e5961042 100644 (file)
@@ -1150,14 +1150,6 @@ fully_constant_expression (pre_expr e)
        vn_nary_op_t nary = PRE_EXPR_NARY (e);
        switch (TREE_CODE_CLASS (nary->opcode))
          {
-         case tcc_expression:
-           if (nary->opcode == TRUTH_NOT_EXPR)
-             goto do_unary;
-           if (nary->opcode != TRUTH_AND_EXPR
-               && nary->opcode != TRUTH_OR_EXPR
-               && nary->opcode != TRUTH_XOR_EXPR)
-             return e;
-           /* Fallthrough.  */
          case tcc_binary:
          case tcc_comparison:
            {
@@ -1199,7 +1191,6 @@ fully_constant_expression (pre_expr e)
              return e;
            /* Fallthrough.  */
          case tcc_unary:
-do_unary:
            {
              /* We have to go from trees to pre exprs to value ids to
                 constants.  */
index c6da47b6cd9c70e7eb187e308bda5b931b6a5216..b028588d8ca7438447d7f31d13f3f9853c356a68 100644 (file)
@@ -1088,9 +1088,7 @@ use_pred_not_overlap_with_undef_path_pred (
 static inline bool
 is_and_or_or (enum tree_code tc, tree typ)
 {
-  return (tc == TRUTH_AND_EXPR
-          || tc == TRUTH_OR_EXPR
-          || tc == BIT_IOR_EXPR
+  return (tc == BIT_IOR_EXPR
           || (tc == BIT_AND_EXPR
               && (typ == 0 || TREE_CODE (typ) == BOOLEAN_TYPE)));
 }
@@ -1415,15 +1413,15 @@ is_norm_cond_subset_of (norm_cond_t norm_cond1,
   code1 = norm_cond1->cond_code;
   code2 = norm_cond2->cond_code;
 
-  if (code1 == TRUTH_AND_EXPR || code1 == BIT_AND_EXPR)
+  if (code1 == BIT_AND_EXPR)
     {
       /* Both conditions are AND expressions.  */
-      if (code2 == TRUTH_AND_EXPR || code2 == BIT_AND_EXPR)
+      if (code2 == BIT_AND_EXPR)
         return is_and_set_subset_of (norm_cond1, norm_cond2);
       /* NORM_COND1 is an AND expression, and NORM_COND2 is an OR
          expression. In this case, returns true if any subexpression
          of NORM_COND1 is a subset of any subexpression of NORM_COND2.  */
-      else if (code2 == TRUTH_OR_EXPR || code2 == BIT_IOR_EXPR)
+      else if (code2 == BIT_IOR_EXPR)
         {
           size_t len1;
           len1 = VEC_length (gimple, norm_cond1->conds);
@@ -1444,7 +1442,7 @@ is_norm_cond_subset_of (norm_cond_t norm_cond1,
         }
     }
   /* NORM_COND1 is an OR expression  */
-  else if (code1 == TRUTH_OR_EXPR || code1 == BIT_IOR_EXPR)
+  else if (code1 == BIT_IOR_EXPR)
     {
       if (code2 != code1)
         return false;
@@ -1457,10 +1455,10 @@ is_norm_cond_subset_of (norm_cond_t norm_cond1,
       gcc_assert (VEC_length (gimple, norm_cond1->conds) == 1);
       /* Conservatively returns false if NORM_COND1 is non-decomposible
          and NORM_COND2 is an AND expression.  */
-      if (code2 == TRUTH_AND_EXPR || code2 == BIT_AND_EXPR)
+      if (code2 == BIT_AND_EXPR)
         return false;
 
-      if (code2 == TRUTH_OR_EXPR || code2 == BIT_IOR_EXPR)
+      if (code2 == BIT_IOR_EXPR)
         return is_subset_of_any (VEC_index (gimple, norm_cond1->conds, 0),
                                  norm_cond1->invert, norm_cond2, false);