summaryrefslogtreecommitdiff
path: root/gcc/tree-tailcall.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-07 14:17:44 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-07 14:17:44 +0000
commit874117c8af0ac20060e8d2d5c65d2dc198eeff35 (patch)
treecee5b4d66982f0920c475733a3ba823b7db12268 /gcc/tree-tailcall.c
parent1ba198c0dcbe49655105bac3e33c5d0359440db4 (diff)
downloadgcc-874117c8af0ac20060e8d2d5c65d2dc198eeff35.tar.gz
2012-08-07 Richard Guenther <rguenther@suse.de>
* tree-flow.h (copy_ssa_name_fn): New function. (duplicate_ssa_name_fn): Likewise. * tree-flow-inline.h (copy_ssa_name): New function. (duplicate_ssa_name): Likewise. * tree-ssanames.c (copy_ssa_name_fn): New function. (duplicate_ssa_name): Rename to ... (duplicate_ssa_name_fn): ... this and adjust. * tree-tailcall.c (update_accumulator_with_ops): Use copy_ssa_name. * tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1): Likewise. (slpeel_update_phi_nodes_for_guard2): Likewise. (slpeel_tree_peel_loop_to_edge): Likewise. (vect_loop_versioning): Likewise. * tree-parloops.c (transform_to_exit_first_loop): Likewise. (create_parallel_loop): Likewise. * ipa-split.c (split_function): Likewise. * tree-vect-loop.c (vect_is_simple_reduction_1): Likewise. (vect_create_epilog_for_reduction): Likewise. * tree-vect-data-refs.c (bump_vector_ptr): Likewise. (vect_setup_realignment): Likewise. * tree-vect-stmts.c (vectorizable_load): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. (gen_def_assigns): Likewise. * tree-cfg.c (gimple_make_forwarder_block): Likewise. * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call create_zero_dim_array with the SSA name. (rewrite_phi_out_of_ssa): Likewise. (rewrite_cross_bb_scalar_dependence): Likewise. Use copy_ssa_name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190202 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r--gcc/tree-tailcall.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index b5356f5edbf..594617a67fe 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -644,9 +644,9 @@ update_accumulator_with_ops (enum tree_code code, tree acc, tree op1,
gimple_stmt_iterator gsi)
{
gimple stmt;
- tree var;
+ tree var = copy_ssa_name (acc, NULL);
if (types_compatible_p (TREE_TYPE (acc), TREE_TYPE (op1)))
- stmt = gimple_build_assign_with_ops (code, SSA_NAME_VAR (acc), acc, op1);
+ stmt = gimple_build_assign_with_ops (code, var, acc, op1);
else
{
tree rhs = fold_convert (TREE_TYPE (acc),
@@ -656,11 +656,8 @@ update_accumulator_with_ops (enum tree_code code, tree acc, tree op1,
op1));
rhs = force_gimple_operand_gsi (&gsi, rhs,
false, NULL, false, GSI_CONTINUE_LINKING);
- stmt = gimple_build_assign (NULL_TREE, rhs);
+ stmt = gimple_build_assign (var, rhs);
}
- var = make_ssa_name (SSA_NAME_VAR (acc), stmt);
- gimple_assign_set_lhs (stmt, var);
- update_stmt (stmt);
gsi_insert_after (&gsi, stmt, GSI_NEW_STMT);
return var;
}