summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorYvan Roux <yvan.roux@linaro.org>2016-04-12 13:39:01 +0200
committerYvan Roux <yvan.roux@linaro.org>2016-04-14 08:32:53 +0200
commit8d7043e84c526ead366949c3c30ce74f964efe91 (patch)
tree78fe3a1a7554a848fc30717c71105e45359bf3ef /gcc/tree-ssa-loop-ivcanon.c
parent55d3bceea8eef018564a026e615af58cca5d6273 (diff)
downloadgcc-8d7043e84c526ead366949c3c30ce74f964efe91.tar.gz
Merge branches/gcc-5-branch rev 234898.
Change-Id: I076a131171e689eede74dd1827406c6d3855fcbd
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 138468d396a..f97c81912a6 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -1193,38 +1193,6 @@ canonicalize_induction_variables (void)
return 0;
}
-/* Propagate VAL into all uses of SSA_NAME. */
-
-static void
-propagate_into_all_uses (tree ssa_name, tree val)
-{
- imm_use_iterator iter;
- gimple use_stmt;
-
- FOR_EACH_IMM_USE_STMT (use_stmt, iter, ssa_name)
- {
- gimple_stmt_iterator use_stmt_gsi = gsi_for_stmt (use_stmt);
- use_operand_p use;
-
- FOR_EACH_IMM_USE_ON_STMT (use, iter)
- SET_USE (use, val);
-
- if (is_gimple_assign (use_stmt)
- && get_gimple_rhs_class (gimple_assign_rhs_code (use_stmt))
- == GIMPLE_SINGLE_RHS)
- {
- tree rhs = gimple_assign_rhs1 (use_stmt);
-
- if (TREE_CODE (rhs) == ADDR_EXPR)
- recompute_tree_invariant_for_addr_expr (rhs);
- }
-
- fold_stmt_inplace (&use_stmt_gsi);
- update_stmt (use_stmt);
- maybe_clean_or_replace_eh_stmt (use_stmt, use_stmt);
- }
-}
-
/* Propagate constant SSA_NAMEs defined in basic block BB. */
static void
@@ -1241,7 +1209,7 @@ propagate_constants_for_unrolling (basic_block bb)
&& gimple_phi_num_args (phi) == 1
&& TREE_CODE (arg) == INTEGER_CST)
{
- propagate_into_all_uses (result, arg);
+ replace_uses_by (result, arg);
gsi_remove (&gsi, true);
release_ssa_name (result);
}
@@ -1260,7 +1228,7 @@ propagate_constants_for_unrolling (basic_block bb)
&& (lhs = gimple_assign_lhs (stmt), TREE_CODE (lhs) == SSA_NAME)
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
{
- propagate_into_all_uses (lhs, gimple_assign_rhs1 (stmt));
+ replace_uses_by (lhs, gimple_assign_rhs1 (stmt));
gsi_remove (&gsi, true);
release_ssa_name (lhs);
}