diff options
author | Richard Guenther <rguenther@suse.de> | 2010-02-26 16:01:52 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-02-26 16:01:52 +0000 |
commit | 3753001420bcb94c509d028f41fc6f957b72e8d3 (patch) | |
tree | 5b2a9657dd7206c0286ba4768950454a5eb7b9fd /gcc/gimple.c | |
parent | 095c7b3cbd4094944097b95b4a2c00d475b47ca9 (diff) | |
download | gcc-3753001420bcb94c509d028f41fc6f957b72e8d3.zip gcc-3753001420bcb94c509d028f41fc6f957b72e8d3.tar.gz gcc-3753001420bcb94c509d028f41fc6f957b72e8d3.tar.bz2 |
re PR tree-optimization/43186 (A loop in tree_unroll_loops_completely never ends)
2010-02-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43186
* gimple.h (gimple_fold): Remove.
* gimple.c (gimple_fold): Remove. Inline into single user ...
* tree-cfgcleanup.c (cleanup_control_expr_graph): ... here.
Try harder for conditions.
* gcc.c-torture/compile/pr43186.c: New testcase.
From-SVN: r157093
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index dce5ba5..717a020 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -1835,54 +1835,6 @@ gimple_set_bb (gimple stmt, basic_block bb) } -/* Fold the expression computed by STMT. If the expression can be - folded, return the folded result, otherwise return NULL. STMT is - not modified. */ - -tree -gimple_fold (const_gimple stmt) -{ - location_t loc = gimple_location (stmt); - switch (gimple_code (stmt)) - { - case GIMPLE_COND: - return fold_binary_loc (loc, gimple_cond_code (stmt), - boolean_type_node, - gimple_cond_lhs (stmt), - gimple_cond_rhs (stmt)); - - case GIMPLE_ASSIGN: - switch (get_gimple_rhs_class (gimple_assign_rhs_code (stmt))) - { - case GIMPLE_UNARY_RHS: - return fold_unary_loc (loc, gimple_assign_rhs_code (stmt), - TREE_TYPE (gimple_assign_lhs (stmt)), - gimple_assign_rhs1 (stmt)); - case GIMPLE_BINARY_RHS: - return fold_binary_loc (loc, gimple_assign_rhs_code (stmt), - TREE_TYPE (gimple_assign_lhs (stmt)), - gimple_assign_rhs1 (stmt), - gimple_assign_rhs2 (stmt)); - case GIMPLE_SINGLE_RHS: - return fold (gimple_assign_rhs1 (stmt)); - default:; - } - break; - - case GIMPLE_SWITCH: - return gimple_switch_index (stmt); - - case GIMPLE_CALL: - return NULL_TREE; - - default: - break; - } - - gcc_unreachable (); -} - - /* Modify the RHS of the assignment pointed-to by GSI using the operands in the expression tree EXPR. |