aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-04-19 13:37:12 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-04-19 13:37:12 +0000
commit01d8bf070a2ca6a10c66a81f1b5e1c00856b5bc4 (patch)
tree296dc78a662c0699454b4483380a99d413a514d7 /gcc/tree-vectorizer.h
parentede22fc330f055810555d867de5a8e3d3f94ad63 (diff)
downloadgcc-01d8bf070a2ca6a10c66a81f1b5e1c00856b5bc4.zip
gcc-01d8bf070a2ca6a10c66a81f1b5e1c00856b5bc4.tar.gz
gcc-01d8bf070a2ca6a10c66a81f1b5e1c00856b5bc4.tar.bz2
re PR tree-optimization/56270 (loop over array of struct float causes compiler error: segmentation fault)
2013-04-19 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (struct _slp_instance): Move load_permutation member ... (struct _slp_tree): ... here. Make it a vector of unsigned ints. (SLP_INSTANCE_LOAD_PERMUTATION): Remove. (SLP_TREE_LOAD_PERMUTATION): Add. (vect_transform_slp_perm_load): Adjust prototype. * tree-vect-slp.c (vect_free_slp_tree): Adjust. (vect_free_slp_instance): Likewise. (vect_create_new_slp_node): Likewise. (vect_supported_slp_permutation_p): Remove. (vect_slp_rearrange_stmts): Adjust. (vect_supported_load_permutation_p): Likewise. Inline vect_supported_slp_permutation_p here. (vect_analyze_slp_instance): Compute load permutations per slp node instead of per instance. (vect_get_slp_defs): Adjust. (vect_transform_slp_perm_load): Likewise. (vect_schedule_slp_instance): Remove redundant code. (vect_schedule_slp): Remove hack for PR56270, add it ... * tree-vect-stmts.c (vectorizable_load): ... here, do not CSE loads for SLP. Adjust. From-SVN: r198095
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 8071149..2f0374d 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -106,6 +106,9 @@ struct _slp_tree {
vec<slp_tree> children;
/* A group of scalar stmts to be vectorized together. */
vec<gimple> stmts;
+ /* Load permutation relative to the stores, NULL if there is no
+ permutation. */
+ vec<unsigned> load_permutation;
/* Vectorized stmt/s. */
vec<gimple> vec_stmts;
/* Number of vector stmts that are created to replace the group of scalar
@@ -131,10 +134,6 @@ typedef struct _slp_instance {
/* Vectorization costs associated with SLP instance. */
stmt_vector_for_cost body_cost_vec;
- /* Loads permutation relatively to the stores, NULL if there is no
- permutation. */
- vec<int> load_permutation;
-
/* The group of nodes that contain loads of this SLP instance. */
vec<slp_tree> loads;
@@ -149,7 +148,6 @@ typedef struct _slp_instance {
#define SLP_INSTANCE_GROUP_SIZE(S) (S)->group_size
#define SLP_INSTANCE_UNROLLING_FACTOR(S) (S)->unrolling_factor
#define SLP_INSTANCE_BODY_COST_VEC(S) (S)->body_cost_vec
-#define SLP_INSTANCE_LOAD_PERMUTATION(S) (S)->load_permutation
#define SLP_INSTANCE_LOADS(S) (S)->loads
#define SLP_INSTANCE_FIRST_LOAD_STMT(S) (S)->first_load
@@ -157,6 +155,7 @@ typedef struct _slp_instance {
#define SLP_TREE_SCALAR_STMTS(S) (S)->stmts
#define SLP_TREE_VEC_STMTS(S) (S)->vec_stmts
#define SLP_TREE_NUMBER_OF_VEC_STMTS(S) (S)->vec_stmts_size
+#define SLP_TREE_LOAD_PERMUTATION(S) (S)->load_permutation
/* This structure is used in creation of an SLP tree. Each instance
corresponds to the same operand in a group of scalar stmts in an SLP
@@ -961,7 +960,7 @@ extern int vect_get_single_scalar_iteration_cost (loop_vec_info);
/* In tree-vect-slp.c. */
extern void vect_free_slp_instance (slp_instance);
-extern bool vect_transform_slp_perm_load (gimple, vec<tree> ,
+extern bool vect_transform_slp_perm_load (slp_tree, vec<tree> ,
gimple_stmt_iterator *, int,
slp_instance, bool);
extern bool vect_schedule_slp (loop_vec_info, bb_vec_info);