This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Update renaming in vectorizer
- From: Ira Rosen <IRAR at il dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 31 May 2009 13:52:15 +0300
- Subject: [patch] Update renaming in vectorizer
Hi,
This patch replaces a call to mark_set_for_renaming (for loop symbols) with
a call to mark_sym_for_renaming (gimple_vop (cfun)).
Bootstrapped with vectorization enabled on powerpc64-suse-linux and
regtested on x86_64-suse-linux.
Committed revision 148013.
Ira
ChangeLog:
* tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1): Don't
mark phis for renaming.
* tree-vectorizer.c (vect_memsyms_to_rename): Remove.
(vectorize_loops): Don't allocate and free vect_memsyms_to_rename.
Call mark_sym_for_renaming.
* tree-vectorizer.h (vect_memsyms_to_rename): Remove.
* tree-vect-loop.c (vect_transform_loop): Remove
vect_memsyms_to_rename
initialization and a call to mark_set_for_renaming.
Index: tree-vect-loop-manip.c
===================================================================
--- tree-vect-loop-manip.c (revision 148012)
+++ tree-vect-loop-manip.c (working copy)
@@ -371,7 +371,6 @@ slpeel_update_phi_nodes_for_guard1 (edge
basic_block orig_bb = loop->header;
edge new_exit_e;
tree current_new_name;
- tree name;
gimple_stmt_iterator gsi_orig, gsi_update;
/* Create new bb between loop and new_merge_bb. */
@@ -387,15 +386,6 @@ slpeel_update_phi_nodes_for_guard1 (edge
orig_phi = gsi_stmt (gsi_orig);
update_phi = gsi_stmt (gsi_update);
- /* Virtual phi; Mark it for renaming. We actually want to call
- mar_sym_for_renaming, but since all ssa renaming datastructures
- are going to be freed before we get to call ssa_update, we just
- record this name for now in a bitmap, and will mark it for
- renaming later. */
- name = PHI_RESULT (orig_phi);
- if (!is_gimple_reg (SSA_NAME_VAR (name)))
- bitmap_set_bit (vect_memsyms_to_rename, DECL_UID (SSA_NAME_VAR
(name)));
-
/** 1. Handle new-merge-point phis **/
/* 1.1. Generate new phi node in NEW_MERGE_BB: */
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c (revision 148012)
+++ tree-vectorizer.c (working copy)
@@ -81,9 +81,6 @@ static enum verbosity_levels user_vect_v
/* Loop or bb location. */
LOC vect_location;
-/* Bitmap of virtual variables to be renamed. */
-bitmap vect_memsyms_to_rename;
-
/* Vector mapping GIMPLE stmt to stmt_vec_info. */
VEC(vec_void_p,heap) *stmt_vec_info_vec;
@@ -206,10 +203,6 @@ vectorize_loops (void)
/* Fix the verbosity level if not defined explicitly by the user. */
vect_set_dump_settings (false);
- /* Allocate the bitmap that records which virtual variables
- need to be renamed. */
- vect_memsyms_to_rename = BITMAP_ALLOC (NULL);
-
init_stmt_vec_info_vec ();
/* ----------- Analyze loops. ----------- */
@@ -244,7 +237,7 @@ vectorize_loops (void)
/* ----------- Finalize. ----------- */
- BITMAP_FREE (vect_memsyms_to_rename);
+ mark_sym_for_renaming (gimple_vop (cfun));
for (i = 1; i < vect_loops_num; i++)
{
Index: tree-vectorizer.h
===================================================================
--- tree-vectorizer.h (revision 148012)
+++ tree-vectorizer.h (working copy)
@@ -728,9 +728,6 @@ known_alignment_for_access_p (struct dat
extern FILE *vect_dump;
extern LOC vect_loop_location;
-/* Bitmap of virtual variables to be renamed. */
-extern bitmap vect_memsyms_to_rename;
-
/*-----------------------------------------------------------------*/
/* Function prototypes. */
/*-----------------------------------------------------------------*/
Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c (revision 148012)
+++ tree-vect-loop.c (working copy)
@@ -3654,10 +3654,6 @@ vect_transform_loop (loop_vec_info loop_
!do_peeling_for_loop_bound,
&cond_expr, &cond_expr_stmt_list);
- /* CHECKME: we wouldn't need this if we called update_ssa once
- for all loops. */
- bitmap_zero (vect_memsyms_to_rename);
-
/* If the loop has a symbolic number of iterations 'n' (i.e. it's not a
compile time constant), or it is a constant that doesn't divide by
the
vectorization factor, then an epilog loop needs to be created.
@@ -3812,8 +3808,6 @@ vect_transform_loop (loop_vec_info loop_
slpeel_make_loop_iterate_ntimes (loop, ratio);
- mark_set_for_renaming (vect_memsyms_to_rename);
-
/* The memory tags and pointers in vectorized statements need to
have their SSA forms updated. FIXME, why can't this be delayed
until all the loops have been transformed? */