diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-07 14:17:44 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-07 14:17:44 +0000 |
commit | 874117c8af0ac20060e8d2d5c65d2dc198eeff35 (patch) | |
tree | cee5b4d66982f0920c475733a3ba823b7db12268 /gcc/tree-vect-loop-manip.c | |
parent | 1ba198c0dcbe49655105bac3e33c5d0359440db4 (diff) | |
download | gcc-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-vect-loop-manip.c')
-rw-r--r-- | gcc/tree-vect-loop-manip.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 65d939d0ffd..cea8a1b8c52 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -511,14 +511,15 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop, gsi_next (&gsi_orig), gsi_next (&gsi_update)) { source_location loop_locus, guard_locus; + tree new_res; orig_phi = gsi_stmt (gsi_orig); update_phi = gsi_stmt (gsi_update); /** 1. Handle new-merge-point phis **/ /* 1.1. Generate new phi node in NEW_MERGE_BB: */ - new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)), - new_merge_bb); + new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL); + new_phi = create_phi_node (new_res, new_merge_bb); /* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge of LOOP. Set the two phi args in NEW_PHI for these edges: */ @@ -547,8 +548,8 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop, continue; /* 2.1. Generate new phi node in NEW_EXIT_BB: */ - new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)), - *new_exit_bb); + new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL); + new_phi = create_phi_node (new_res, *new_exit_bb); /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */ add_phi_arg (new_phi, loop_arg, single_exit (loop), loop_locus); @@ -636,6 +637,7 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop, for (gsi = gsi_start_phis (update_bb); !gsi_end_p (gsi); gsi_next (&gsi)) { + tree new_res; update_phi = gsi_stmt (gsi); orig_phi = update_phi; orig_def = PHI_ARG_DEF_FROM_EDGE (orig_phi, e); @@ -649,8 +651,8 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop, /** 1. Handle new-merge-point phis **/ /* 1.1. Generate new phi node in NEW_MERGE_BB: */ - new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)), - new_merge_bb); + new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL); + new_phi = create_phi_node (new_res, new_merge_bb); /* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge of LOOP. Set the two PHI args in NEW_PHI for these edges: */ @@ -691,8 +693,8 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop, /** 2. Handle loop-closed-ssa-form phis **/ /* 2.1. Generate new phi node in NEW_EXIT_BB: */ - new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)), - *new_exit_bb); + new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL); + new_phi = create_phi_node (new_res, *new_exit_bb); /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */ add_phi_arg (new_phi, loop_arg, single_exit (loop), UNKNOWN_LOCATION); @@ -726,8 +728,8 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop, arg = guard_arg; /* 3.2. Generate new phi node in GUARD_BB: */ - new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)), - guard_edge->src); + new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL); + new_phi = create_phi_node (new_res, guard_edge->src); /* 3.3. GUARD_BB has one incoming edge: */ gcc_assert (EDGE_COUNT (guard_edge->src->preds) == 1); @@ -1182,13 +1184,11 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, break; if (gsi_end_p (gsi)) { - gimple new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (phi)), - exit_e->dest); + tree new_vop = copy_ssa_name (PHI_RESULT (phi), NULL); + gimple new_phi = create_phi_node (new_vop, exit_e->dest); tree vop = PHI_ARG_DEF_FROM_EDGE (phi, EDGE_SUCC (loop->latch, 0)); imm_use_iterator imm_iter; gimple stmt; - tree new_vop = make_ssa_name (SSA_NAME_VAR (PHI_RESULT (phi)), - new_phi); use_operand_p use_p; add_phi_arg (new_phi, vop, exit_e, UNKNOWN_LOCATION); @@ -2535,9 +2535,10 @@ vect_loop_versioning (loop_vec_info loop_vinfo, for (gsi = gsi_start_phis (merge_bb); !gsi_end_p (gsi); gsi_next (&gsi)) { + tree new_res; orig_phi = gsi_stmt (gsi); - new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)), - new_exit_bb); + new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL); + new_phi = create_phi_node (new_res, new_exit_bb); arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, e); add_phi_arg (new_phi, arg, new_exit_e, gimple_phi_arg_location_from_edge (orig_phi, e)); |