diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-09-17 14:50:13 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-09-17 14:50:13 +0000 |
commit | fea4ea737fa4a9ab3d979b6f0b969a96cbbb4cd1 (patch) | |
tree | d096ec551125ec07018795cb4a794091435c90a9 /gcc/tree-cfgcleanup.c | |
parent | 9bf714c23f5dd6d340571d090f2b22d7f67a9503 (diff) | |
download | gcc-fea4ea737fa4a9ab3d979b6f0b969a96cbbb4cd1.zip gcc-fea4ea737fa4a9ab3d979b6f0b969a96cbbb4cd1.tar.gz gcc-fea4ea737fa4a9ab3d979b6f0b969a96cbbb4cd1.tar.bz2 |
* tree-cfgcleanup. (cleanup_control_expr_graph) <GIMPLE_COND>: Remove
code doing propagation from degenerate PHI nodes.
* tree-ssa-loop-ivcanon.c (propagate_into_all_uses): New function.
(propagate_constants_for_unrolling): Likewise.
(tree_unroll_loops_completely): If the current loop has been unrolled
and its father isn't the entire function, propagate constants within
the new basic blocks by means of propagate_constants_for_unrolling.
From-SVN: r191387
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r-- | gcc/tree-cfgcleanup.c | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 45f3368..9c52286 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -88,40 +88,11 @@ cleanup_control_expr_graph (basic_block bb, gimple_stmt_iterator gsi) switch (gimple_code (stmt)) { case GIMPLE_COND: - { - tree lhs = gimple_cond_lhs (stmt); - tree rhs = gimple_cond_rhs (stmt); - /* For conditions try harder and lookup single-argument - PHI nodes. Only do so from the same basic-block though - as other basic-blocks may be dead already. */ - if (TREE_CODE (lhs) == SSA_NAME - && !name_registered_for_update_p (lhs)) - { - gimple def_stmt = SSA_NAME_DEF_STMT (lhs); - if (gimple_code (def_stmt) == GIMPLE_PHI - && gimple_phi_num_args (def_stmt) == 1 - && gimple_bb (def_stmt) == gimple_bb (stmt) - && (TREE_CODE (PHI_ARG_DEF (def_stmt, 0)) != SSA_NAME - || !name_registered_for_update_p (PHI_ARG_DEF (def_stmt, - 0)))) - lhs = PHI_ARG_DEF (def_stmt, 0); - } - if (TREE_CODE (rhs) == SSA_NAME - && !name_registered_for_update_p (rhs)) - { - gimple def_stmt = SSA_NAME_DEF_STMT (rhs); - if (gimple_code (def_stmt) == GIMPLE_PHI - && gimple_phi_num_args (def_stmt) == 1 - && gimple_bb (def_stmt) == gimple_bb (stmt) - && (TREE_CODE (PHI_ARG_DEF (def_stmt, 0)) != SSA_NAME - || !name_registered_for_update_p (PHI_ARG_DEF (def_stmt, - 0)))) - rhs = PHI_ARG_DEF (def_stmt, 0); - } - val = fold_binary_loc (loc, gimple_cond_code (stmt), - boolean_type_node, lhs, rhs); - break; - } + val = fold_binary_loc (loc, gimple_cond_code (stmt), + boolean_type_node, + gimple_cond_lhs (stmt), + gimple_cond_rhs (stmt)); + break; case GIMPLE_SWITCH: val = gimple_switch_index (stmt); |