diff options
author | Dorit Nuzman <dorit@il.ibm.com> | 2005-08-18 16:07:54 +0000 |
---|---|---|
committer | Dorit Nuzman <dorit@gcc.gnu.org> | 2005-08-18 16:07:54 +0000 |
commit | 90ff949ff7d9944c5a74314de7765046c96898a8 (patch) | |
tree | 5a4e2f96ccfdb102363ddcfd937e2214b062700d /gcc/tree-vectorizer.c | |
parent | f17db6cd86ad1c3a67951f02abe211545efe10ef (diff) | |
download | gcc-90ff949ff7d9944c5a74314de7765046c96898a8.tar.gz |
re PR tree-optimization/22228 (ICE with -ftree-vectorize in verify_ssa)
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.
From-SVN: r103252
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r-- | gcc/tree-vectorizer.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 4bdb552fa84..1cce052d276 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -179,6 +179,9 @@ unsigned int vect_loops_num; /* Loop location. */ static LOC vect_loop_location; + +/* Bitmap of virtual variables to be renamed. */ +bitmap vect_vnames_to_rename; /************************************************************************* Simple Loop Peeling Utilities @@ -511,6 +514,7 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop, 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); @@ -522,6 +526,15 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop, 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: */ @@ -2010,6 +2023,10 @@ vectorize_loops (struct loops *loops) /* 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 @@ -2041,6 +2058,8 @@ vectorize_loops (struct loops *loops) /* ----------- Finalize. ----------- */ + BITMAP_FREE (vect_vnames_to_rename); + for (i = 1; i < vect_loops_num; i++) { struct loop *loop = loops->parray[i]; |