From 9e9eadd1e20230f386659a248afb6add2ba8909e Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 29 Jul 2015 14:17:49 +0000 Subject: [PATCH] gimple-fold.c (fold_gimple_cond): Remove. 2015-07-29 Richard Biener * gimple-fold.c (fold_gimple_cond): Remove. (fold_stmt_1): Do not call it. From-SVN: r226351 --- gcc/ChangeLog | 5 +++++ gcc/gimple-fold.c | 31 ------------------------------- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ccf95e32f8..f014786da12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-07-29 Richard Biener + + * gimple-fold.c (fold_gimple_cond): Remove. + (fold_stmt_1): Do not call it. + 2015-07-29 Alan Lawrence * config/aarch64/aarch64-builtins.c (aarch64_fp16_type_node): New. diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 68a4a9f5f45..789fd227d13 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -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 (stmt)); - break; - case GIMPLE_CALL: changed |= gimple_fold_call (gsi, inplace); break; -- 2.30.2