diff options
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index f1d0cd7..a4043e4 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -196,6 +196,11 @@ struct _slp_tree { denotes the number of output lanes. */ lane_permutation_t lane_permutation; + /* Selected SIMD clone's function info. First vector element + is SIMD clone's function decl, followed by a pair of trees (base + step) + for linear arguments (pair of NULLs for other arguments). */ + vec<tree> simd_clone_info; + tree vectype; /* Vectorized defs. */ vec<tree> vec_defs; @@ -300,6 +305,7 @@ public: #define SLP_TREE_NUMBER_OF_VEC_STMTS(S) (S)->vec_stmts_size #define SLP_TREE_LOAD_PERMUTATION(S) (S)->load_permutation #define SLP_TREE_LANE_PERMUTATION(S) (S)->lane_permutation +#define SLP_TREE_SIMD_CLONE_INFO(S) (S)->simd_clone_info #define SLP_TREE_DEF_TYPE(S) (S)->def_type #define SLP_TREE_VECTYPE(S) (S)->vectype #define SLP_TREE_REPRESENTATIVE(S) (S)->representative @@ -882,6 +888,12 @@ public: we need to peel off iterations at the end to form an epilogue loop. */ bool peeling_for_niter; + /* List of loop additional IV conditionals found in the loop. */ + auto_vec<gcond *> conds; + + /* Main loop IV cond. */ + gcond* loop_iv_cond; + /* True if there are no loop carried data dependencies in the loop. If loop->safelen <= 1, then this is always true, either the loop didn't have any loop carried data dependencies, or the loop is being @@ -919,10 +931,24 @@ public: analysis. */ vec<_loop_vec_info *> epilogue_vinfos; + /* The controlling loop IV for the current loop when vectorizing. This IV + controls the natural exits of the loop. */ + edge vec_loop_iv_exit; + + /* The controlling loop IV for the epilogue loop when vectorizing. This IV + controls the natural exits of the loop. */ + edge vec_epilogue_loop_iv_exit; + + /* The controlling loop IV for the scalar loop being vectorized. This IV + controls the natural exits of the loop. */ + edge scalar_loop_iv_exit; } *loop_vec_info; /* Access Functions. */ #define LOOP_VINFO_LOOP(L) (L)->loop +#define LOOP_VINFO_IV_EXIT(L) (L)->vec_loop_iv_exit +#define LOOP_VINFO_EPILOGUE_IV_EXIT(L) (L)->vec_epilogue_loop_iv_exit +#define LOOP_VINFO_SCALAR_IV_EXIT(L) (L)->scalar_loop_iv_exit #define LOOP_VINFO_BBS(L) (L)->bbs #define LOOP_VINFO_NITERSM1(L) (L)->num_itersm1 #define LOOP_VINFO_NITERS(L) (L)->num_iters @@ -970,6 +996,8 @@ public: #define LOOP_VINFO_REDUCTION_CHAINS(L) (L)->reduction_chains #define LOOP_VINFO_PEELING_FOR_GAPS(L) (L)->peeling_for_gaps #define LOOP_VINFO_PEELING_FOR_NITER(L) (L)->peeling_for_niter +#define LOOP_VINFO_LOOP_CONDS(L) (L)->conds +#define LOOP_VINFO_LOOP_IV_COND(L) (L)->loop_iv_cond #define LOOP_VINFO_NO_DATA_DEPENDENCIES(L) (L)->no_data_dependencies #define LOOP_VINFO_SCALAR_LOOP(L) (L)->scalar_loop #define LOOP_VINFO_SCALAR_LOOP_SCALING(L) (L)->scalar_loop_scaling @@ -2155,11 +2183,13 @@ class auto_purge_vect_location /* Simple loop peeling and versioning utilities for vectorizer's purposes - in tree-vect-loop-manip.cc. */ -extern void vect_set_loop_condition (class loop *, loop_vec_info, +extern void vect_set_loop_condition (class loop *, edge, loop_vec_info, tree, tree, tree, bool); -extern bool slpeel_can_duplicate_loop_p (const class loop *, const_edge); -class loop *slpeel_tree_duplicate_loop_to_edge_cfg (class loop *, - class loop *, edge); +extern bool slpeel_can_duplicate_loop_p (const class loop *, const_edge, + const_edge); +class loop *slpeel_tree_duplicate_loop_to_edge_cfg (class loop *, edge, + class loop *, edge, + edge, edge *, bool = true); class loop *vect_loop_versioning (loop_vec_info, gimple *); extern class loop *vect_do_peeling (loop_vec_info, tree, tree, tree *, tree *, tree *, int, bool, bool, @@ -2169,6 +2199,7 @@ extern void vect_prepare_for_masked_peels (loop_vec_info); extern dump_user_location_t find_loop_location (class loop *); extern bool vect_can_advance_ivs_p (loop_vec_info); extern void vect_update_inits_of_drs (loop_vec_info, tree, tree_code); +extern edge vec_init_loop_exit_info (class loop *); /* In tree-vect-stmts.cc. */ extern tree get_related_vectype_for_scalar_type (machine_mode, tree, @@ -2356,8 +2387,9 @@ struct vect_loop_form_info tree number_of_iterations; tree number_of_iterationsm1; tree assumptions; - gcond *loop_cond; + auto_vec<gcond *> conds; gcond *inner_loop_cond; + edge loop_exit; }; extern opt_result vect_analyze_loop_form (class loop *, vect_loop_form_info *); extern loop_vec_info vect_create_loop_vinfo (class loop *, vec_info_shared *, |