* tree-ssa-loop (pass_vectorize): Add TODO_verify_loops to todo_flags_start.
* tree-vect-transform.c (vect_transform_loop): Mark the variables that
are recorded in vect_vnames_to_rename for renaming.
* tree-vectorizer.c (vect_vnames_to_rename): New global bitmap.
(slpeel_update_phi_nodes_for_guard1): Record virtual vars for renaming
in vect_vnames_to_rename.
(vectorize_loops): Allocate and free the vect_vnames_to_rename bitmap.
* tree-vectorizer.h (vect_vnames_to_rename): New extern variable.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103252
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-08-18 Dorit Nuzman <dorit@il.ibm.com>
+
+ PR tree-optimization/22228
+ * tree-ssa-loop (pass_vectorize): Add TODO_verify_loops to todo_flags_start.
+ * tree-vect-transform.c (vect_transform_loop): Mark the variables that
+ are recorded in vect_vnames_to_rename for renaming.
+ * tree-vectorizer.c (vect_vnames_to_rename): New global bitmap.
+ (slpeel_update_phi_nodes_for_guard1): Record virtual vars for renaming
+ in vect_vnames_to_rename.
+ (vectorize_loops): Allocate and free the vect_vnames_to_rename bitmap.
+ * tree-vectorizer.h (vect_vnames_to_rename): New extern variable.
+
2005-08-18 Jan Hubicka <jh@suse.cz>
PR c++/22034
+2005-08-18 Dorit Nuzman <dorit@il.ibm.com>
+
+ PR tree-optimization/22228
+ * g++.dg/vect/pr22543.cc: New test.
+
2005-08-17 Steven Bosscher <stevenb@suse.de>
PR tree-optimization/21574
--- /dev/null
+/* { dg-do compile } */
+
+struct A
+{
+ int i, j;
+
+ A() : i(), j() {}
+ ~A() {}
+
+ operator int() { return 0; }
+};
+
+struct B
+{
+ A foo() const { return A(); }
+};
+
+struct X { ~X(); };
+
+struct C
+{
+ C();
+
+ int z[4];
+};
+
+C::C()
+{
+ for (int i=0; i<4; ++i)
+ z[i]=0;
+
+ X x;
+
+ for (int i=0; i<4; ++i)
+ int j = B().foo();
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
- 0, /* todo_flags_start */
+ TODO_verify_loops, /* todo_flags_start */
TODO_dump_func | TODO_update_ssa, /* todo_flags_finish */
0 /* letter */
};
int i;
tree ratio = NULL;
int vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ bitmap_iterator bi;
+ unsigned int j;
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "=== vec_transform_loop ===");
+ /* CHECKME: we wouldn't need this if we calles update_ssa once
+ for all loops. */
+ bitmap_zero (vect_vnames_to_rename);
+
/* Peel the loop if there are data refs with unknown alignment.
Only one data ref with unknown store is allowed. */
slpeel_make_loop_iterate_ntimes (loop, ratio);
+ EXECUTE_IF_SET_IN_BITMAP (vect_vnames_to_rename, 0, j, bi)
+ mark_sym_for_renaming (SSA_NAME_VAR (ssa_name (j)));
+
/* 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? */
/* Loop location. */
static LOC vect_loop_location;
+
+/* Bitmap of virtual variables to be renamed. */
+bitmap vect_vnames_to_rename;
\f
/*************************************************************************
Simple Loop Peeling Utilities
basic_block orig_bb = loop->header;
edge new_exit_e;
tree current_new_name;
+ tree name;
/* Create new bb between loop and new_merge_bb. */
*new_exit_bb = split_edge (loop->single_exit);
orig_phi && update_phi;
orig_phi = PHI_CHAIN (orig_phi), update_phi = PHI_CHAIN (update_phi))
{
+ /* 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_upate, 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_vnames_to_rename, SSA_NAME_VERSION (name));
+
/** 1. Handle new-merge-point phis **/
/* 1.1. Generate new phi node in NEW_MERGE_BB: */
/* Fix the verbosity level if not defined explicitly by the user. */
vect_set_dump_settings ();
+ /* Allocate the bitmap that records which virtual variables that
+ need to be renamed. */
+ vect_vnames_to_rename = BITMAP_ALLOC (NULL);
+
/* ----------- Analyze loops. ----------- */
/* If some loop was duplicated, it gets bigger number
/* ----------- Finalize. ----------- */
+ BITMAP_FREE (vect_vnames_to_rename);
+
for (i = 1; i < vect_loops_num; i++)
{
struct loop *loop = loops->parray[i];
/* Number of loops, at the beginning of vectorization. */
extern unsigned int vect_loops_num;
+/* Bitmap of virtual variables to be renamed. */
+extern bitmap vect_vnames_to_rename;
+
/*-----------------------------------------------------------------*/
/* Function prototypes. */
/*-----------------------------------------------------------------*/