diff options
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index ef8b695..f764634 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -197,6 +197,9 @@ struct vec_info { /* The type of vectorization. */ vec_kind kind; + /* The mapping of GIMPLE UID to stmt_vec_info. */ + vec<struct _stmt_vec_info *> stmt_vec_infos; + /* All SLP instances. */ auto_vec<slp_instance> slp_instances; @@ -1009,10 +1012,10 @@ struct dataref_aux { && TYPE_PRECISION (TYPE) == 1 \ && TYPE_UNSIGNED (TYPE))) -extern vec<stmt_vec_info> stmt_vec_info_vec; +extern vec<stmt_vec_info> *stmt_vec_info_vec; -void init_stmt_vec_info_vec (void); -void free_stmt_vec_info_vec (void); +void set_stmt_vec_info_vec (vec<stmt_vec_info> *); +void free_stmt_vec_infos (vec<stmt_vec_info> *); /* Return a stmt_vec_info corresponding to STMT. */ @@ -1023,7 +1026,7 @@ vinfo_for_stmt (gimple *stmt) if (uid <= 0) return NULL; - return stmt_vec_info_vec[uid - 1]; + return (*stmt_vec_info_vec)[uid - 1]; } /* Set vectorizer information INFO for STMT. */ @@ -1035,14 +1038,14 @@ set_vinfo_for_stmt (gimple *stmt, stmt_vec_info info) if (uid == 0) { gcc_checking_assert (info); - uid = stmt_vec_info_vec.length () + 1; + uid = stmt_vec_info_vec->length () + 1; gimple_set_uid (stmt, uid); - stmt_vec_info_vec.safe_push (info); + stmt_vec_info_vec->safe_push (info); } else { gcc_checking_assert (info == NULL); - stmt_vec_info_vec[uid - 1] = info; + (*stmt_vec_info_vec)[uid - 1] = info; } } @@ -1065,8 +1068,8 @@ get_earlier_stmt (gimple *stmt1, gimple *stmt2) if (uid1 == 0 || uid2 == 0) return NULL; - gcc_checking_assert (uid1 <= stmt_vec_info_vec.length () - && uid2 <= stmt_vec_info_vec.length ()); + gcc_checking_assert (uid1 <= stmt_vec_info_vec->length () + && uid2 <= stmt_vec_info_vec->length ()); if (uid1 < uid2) return stmt1; @@ -1093,8 +1096,8 @@ get_later_stmt (gimple *stmt1, gimple *stmt2) if (uid1 == 0 || uid2 == 0) return NULL; - gcc_assert (uid1 <= stmt_vec_info_vec.length ()); - gcc_assert (uid2 <= stmt_vec_info_vec.length ()); + gcc_assert (uid1 <= stmt_vec_info_vec->length ()); + gcc_assert (uid2 <= stmt_vec_info_vec->length ()); if (uid1 > uid2) return stmt1; |