Commit 3161455c by Richard Biener Committed by Richard Biener

tree-vectorizer.h (stmt_vec_info_vec): Use vec<stmt_vec_info>.

2015-10-07  Richard Biener  <rguenther@suse.de>

	* tree-vectorizer.h (stmt_vec_info_vec): Use vec<stmt_vec_info>.
	(vinfo_for_stmt): Adjust.
	(set_vinfo_for_stmt): Likewise.
	* tree-vectorizer.c (stmt_vec_info_vec): Likewise.
	* tree-vect-stmts.c (free_stmt_vec_info_vec): Likewise.
	* tree-vect-loop.c (new_loop_vec_info): Remove special-casing
	of inner loop.
	(vect_analyze_loop_1): Remove.
	(vect_analyze_loop_form_1): Avoid building a loop_vec_info for
	inner loop when vectorizing an outer loop by splitting out from ...
	(vect_analyze_loop_form): ... here.

From-SVN: r228563
parent baba8d7d
2015-10-07 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (stmt_vec_info_vec): Use vec<stmt_vec_info>.
(vinfo_for_stmt): Adjust.
(set_vinfo_for_stmt): Likewise.
* tree-vectorizer.c (stmt_vec_info_vec): Likewise.
* tree-vect-stmts.c (free_stmt_vec_info_vec): Likewise.
* tree-vect-loop.c (new_loop_vec_info): Remove special-casing
of inner loop.
(vect_analyze_loop_1): Remove.
(vect_analyze_loop_form_1): Avoid building a loop_vec_info for
inner loop when vectorizing an outer loop by splitting out from ...
(vect_analyze_loop_form): ... here.
2015-10-07 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> 2015-10-07 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR c/65345 PR c/65345
...@@ -8033,10 +8033,10 @@ void ...@@ -8033,10 +8033,10 @@ void
free_stmt_vec_info_vec (void) free_stmt_vec_info_vec (void)
{ {
unsigned int i; unsigned int i;
vec_void_p info; stmt_vec_info info;
FOR_EACH_VEC_ELT (stmt_vec_info_vec, i, info) FOR_EACH_VEC_ELT (stmt_vec_info_vec, i, info)
if (info != NULL) if (info != NULL)
free_stmt_vec_info (STMT_VINFO_STMT ((stmt_vec_info) info)); free_stmt_vec_info (STMT_VINFO_STMT (info));
gcc_assert (stmt_vec_info_vec.exists ()); gcc_assert (stmt_vec_info_vec.exists ());
stmt_vec_info_vec.release (); stmt_vec_info_vec.release ();
} }
......
...@@ -87,7 +87,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -87,7 +87,7 @@ along with GCC; see the file COPYING3. If not see
source_location vect_location; source_location vect_location;
/* Vector mapping GIMPLE stmt to stmt_vec_info. */ /* Vector mapping GIMPLE stmt to stmt_vec_info. */
vec<vec_void_p> stmt_vec_info_vec; vec<stmt_vec_info> stmt_vec_info_vec;
/* For mapping simduid to vectorization factor. */ /* For mapping simduid to vectorization factor. */
......
...@@ -741,10 +741,7 @@ struct dataref_aux { ...@@ -741,10 +741,7 @@ struct dataref_aux {
/* The maximum vectorization factor supported by any target (V64QI). */ /* The maximum vectorization factor supported by any target (V64QI). */
#define MAX_VECTORIZATION_FACTOR 64 #define MAX_VECTORIZATION_FACTOR 64
/* Avoid GTY(()) on stmt_vec_info. */ extern vec<stmt_vec_info> stmt_vec_info_vec;
typedef void *vec_void_p;
extern vec<vec_void_p> stmt_vec_info_vec;
void init_stmt_vec_info_vec (void); void init_stmt_vec_info_vec (void);
void free_stmt_vec_info_vec (void); void free_stmt_vec_info_vec (void);
...@@ -758,7 +755,7 @@ vinfo_for_stmt (gimple *stmt) ...@@ -758,7 +755,7 @@ vinfo_for_stmt (gimple *stmt)
if (uid == 0) if (uid == 0)
return NULL; return NULL;
return (stmt_vec_info) stmt_vec_info_vec[uid - 1]; return stmt_vec_info_vec[uid - 1];
} }
/* Set vectorizer information INFO for STMT. */ /* Set vectorizer information INFO for STMT. */
...@@ -772,10 +769,10 @@ set_vinfo_for_stmt (gimple *stmt, stmt_vec_info info) ...@@ -772,10 +769,10 @@ set_vinfo_for_stmt (gimple *stmt, stmt_vec_info info)
gcc_checking_assert (info); gcc_checking_assert (info);
uid = stmt_vec_info_vec.length () + 1; uid = stmt_vec_info_vec.length () + 1;
gimple_set_uid (stmt, uid); gimple_set_uid (stmt, uid);
stmt_vec_info_vec.safe_push ((vec_void_p) info); stmt_vec_info_vec.safe_push (info);
} }
else else
stmt_vec_info_vec[uid - 1] = (vec_void_p) info; stmt_vec_info_vec[uid - 1] = info;
} }
/* Return the earlier statement between STMT1 and STMT2. */ /* Return the earlier statement between STMT1 and STMT2. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment