+#define STMT_VINFO_TYPE(S) (S)->type
+#define STMT_VINFO_STMT(S) (S)->stmt
+#define STMT_VINFO_LOOP_VINFO(S) (S)->loop_vinfo
+#define STMT_VINFO_BB_VINFO(S) (S)->bb_vinfo
+#define STMT_VINFO_RELEVANT(S) (S)->relevant
+#define STMT_VINFO_LIVE_P(S) (S)->live
+#define STMT_VINFO_VECTYPE(S) (S)->vectype
+#define STMT_VINFO_VEC_STMT(S) (S)->vectorized_stmt
+#define STMT_VINFO_DATA_REF(S) (S)->data_ref_info
+
+#define STMT_VINFO_DR_BASE_ADDRESS(S) (S)->dr_base_address
+#define STMT_VINFO_DR_INIT(S) (S)->dr_init
+#define STMT_VINFO_DR_OFFSET(S) (S)->dr_offset
+#define STMT_VINFO_DR_STEP(S) (S)->dr_step
+#define STMT_VINFO_DR_ALIGNED_TO(S) (S)->dr_aligned_to
+
+#define STMT_VINFO_IN_PATTERN_P(S) (S)->in_pattern_p
+#define STMT_VINFO_RELATED_STMT(S) (S)->related_stmt
+#define STMT_VINFO_SAME_ALIGN_REFS(S) (S)->same_align_refs
+#define STMT_VINFO_DEF_TYPE(S) (S)->def_type
+#define STMT_VINFO_DR_GROUP_FIRST_DR(S) (S)->first_dr
+#define STMT_VINFO_DR_GROUP_NEXT_DR(S) (S)->next_dr
+#define STMT_VINFO_DR_GROUP_SIZE(S) (S)->size
+#define STMT_VINFO_DR_GROUP_STORE_COUNT(S) (S)->store_count
+#define STMT_VINFO_DR_GROUP_GAP(S) (S)->gap
+#define STMT_VINFO_DR_GROUP_SAME_DR_STMT(S)(S)->same_dr_stmt
+#define STMT_VINFO_DR_GROUP_READ_WRITE_DEPENDENCE(S) (S)->read_write_dep
+#define STMT_VINFO_STRIDED_ACCESS(S) ((S)->first_dr != NULL)
+
+#define DR_GROUP_FIRST_DR(S) (S)->first_dr
+#define DR_GROUP_NEXT_DR(S) (S)->next_dr
+#define DR_GROUP_SIZE(S) (S)->size
+#define DR_GROUP_STORE_COUNT(S) (S)->store_count
+#define DR_GROUP_GAP(S) (S)->gap
+#define DR_GROUP_SAME_DR_STMT(S) (S)->same_dr_stmt
+#define DR_GROUP_READ_WRITE_DEPENDENCE(S) (S)->read_write_dep
+
+#define STMT_VINFO_RELEVANT_P(S) ((S)->relevant != vect_unused_in_scope)
+#define STMT_VINFO_OUTSIDE_OF_LOOP_COST(S) (S)->cost.outside_of_loop
+#define STMT_VINFO_INSIDE_OF_LOOP_COST(S) (S)->cost.inside_of_loop
+
+#define HYBRID_SLP_STMT(S) ((S)->slp_type == hybrid)
+#define PURE_SLP_STMT(S) ((S)->slp_type == pure_slp)
+#define STMT_SLP_TYPE(S) (S)->slp_type
+
+/* These are some defines for the initial implementation of the vectorizer's
+ cost model. These will later be target specific hooks. */
+
+/* Cost of conditional taken branch. */
+#ifndef TARG_COND_TAKEN_BRANCH_COST
+#define TARG_COND_TAKEN_BRANCH_COST 3
+#endif
+
+/* Cost of conditional not taken branch. */
+#ifndef TARG_COND_NOT_TAKEN_BRANCH_COST
+#define TARG_COND_NOT_TAKEN_BRANCH_COST 1
+#endif
+
+/* Cost of any scalar operation, excluding load and store. */
+#ifndef TARG_SCALAR_STMT_COST
+#define TARG_SCALAR_STMT_COST 1
+#endif
+
+/* Cost of scalar load. */
+#ifndef TARG_SCALAR_LOAD_COST
+#define TARG_SCALAR_LOAD_COST 1
+#endif
+
+/* Cost of scalar store. */
+#ifndef TARG_SCALAR_STORE_COST
+#define TARG_SCALAR_STORE_COST 1
+#endif
+
+/* Cost of any vector operation, excluding load, store or vector to scalar
+ operation. */
+#ifndef TARG_VEC_STMT_COST
+#define TARG_VEC_STMT_COST 1
+#endif
+
+/* Cost of vector to scalar operation. */
+#ifndef TARG_VEC_TO_SCALAR_COST
+#define TARG_VEC_TO_SCALAR_COST 1
+#endif
+
+/* Cost of scalar to vector operation. */
+#ifndef TARG_SCALAR_TO_VEC_COST
+#define TARG_SCALAR_TO_VEC_COST 1
+#endif
+
+/* Cost of aligned vector load. */
+#ifndef TARG_VEC_LOAD_COST
+#define TARG_VEC_LOAD_COST 1
+#endif
+
+/* Cost of misaligned vector load. */
+#ifndef TARG_VEC_UNALIGNED_LOAD_COST
+#define TARG_VEC_UNALIGNED_LOAD_COST 2
+#endif
+
+/* Cost of vector store. */
+#ifndef TARG_VEC_STORE_COST
+#define TARG_VEC_STORE_COST 1
+#endif
+
+/* Cost of vector permutation. */
+#ifndef TARG_VEC_PERMUTE_COST
+#define TARG_VEC_PERMUTE_COST 1
+#endif
+
+/* The maximum number of intermediate steps required in multi-step type
+ conversion. */
+#define MAX_INTERM_CVT_STEPS 3
+
+/* Avoid GTY(()) on stmt_vec_info. */
+typedef void *vec_void_p;
+DEF_VEC_P (vec_void_p);
+DEF_VEC_ALLOC_P (vec_void_p, heap);
+
+extern VEC(vec_void_p,heap) *stmt_vec_info_vec;
+
+void init_stmt_vec_info_vec (void);
+void free_stmt_vec_info_vec (void);
+
+static inline stmt_vec_info
+vinfo_for_stmt (gimple stmt)
+{
+ unsigned int uid = gimple_uid (stmt);
+ if (uid == 0)
+ return NULL;
+
+ gcc_assert (uid <= VEC_length (vec_void_p, stmt_vec_info_vec));
+ return (stmt_vec_info) VEC_index (vec_void_p, stmt_vec_info_vec, uid - 1);
+}