gimple-fold.c (fold_gimple_cond): Remove.
authorRichard Biener <rguenther@suse.de>
Wed, 29 Jul 2015 14:17:49 +0000 (14:17 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 29 Jul 2015 14:17:49 +0000 (14:17 +0000)
2015-07-29  Richard Biener  <rguenther@suse.de>

* gimple-fold.c (fold_gimple_cond): Remove.
(fold_stmt_1): Do not call it.

From-SVN: r226351

gcc/ChangeLog
gcc/gimple-fold.c

index 1ccf95e32f87ffc7a6691a8b29524c2ac6ca7365..f014786da12bf1d891e96ecb4f6e918f622390e9 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-29  Richard Biener  <rguenther@suse.de>
+
+       * gimple-fold.c (fold_gimple_cond): Remove.
+       (fold_stmt_1): Do not call it.
+
 2015-07-29  Alan Lawrence  <alan.lawrence@arm.com>
 
        * config/aarch64/aarch64-builtins.c (aarch64_fp16_type_node): New.
index 68a4a9f5f45e8120a4095b33c79b96b50f5e1517..789fd227d13c21763c9c3a92d0e4a5f231acd737 100644 (file)
@@ -529,33 +529,6 @@ fold_gimple_assign (gimple_stmt_iterator *si)
   return NULL_TREE;
 }
 
-/* Attempt to fold a conditional statement. Return true if any changes were
-   made. We only attempt to fold the condition expression, and do not perform
-   any transformation that would require alteration of the cfg.  It is
-   assumed that the operands have been previously folded.  */
-
-static bool
-fold_gimple_cond (gcond *stmt)
-{
-  tree result = fold_binary_loc (gimple_location (stmt),
-                            gimple_cond_code (stmt),
-                             boolean_type_node,
-                             gimple_cond_lhs (stmt),
-                             gimple_cond_rhs (stmt));
-
-  if (result)
-    {
-      STRIP_USELESS_TYPE_CONVERSION (result);
-      if (is_gimple_condexpr (result))
-        {
-          gimple_cond_set_condition_from_tree (stmt, result);
-          return true;
-        }
-    }
-
-  return false;
-}
-
 
 /* Replace a statement at *SI_P with a sequence of statements in STMTS,
    adjusting the replacement stmts location and virtual operands.
@@ -3711,10 +3684,6 @@ fold_stmt_1 (gimple_stmt_iterator *gsi, bool inplace, tree (*valueize) (tree))
        break;
       }
 
-    case GIMPLE_COND:
-      changed |= fold_gimple_cond (as_a <gcond *> (stmt));
-      break;
-
     case GIMPLE_CALL:
       changed |= gimple_fold_call (gsi, inplace);
       break;