diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2011-04-20 09:25:42 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2011-04-20 09:25:42 +0000 |
commit | 267d3070f755138d967f6fd0c05b3c9ccb361aaf (patch) | |
tree | e069d62850ed1e1da9555cd452f0ceaefe28bbce /gcc/tree-vect-data-refs.c | |
parent | 0b2ddd9ce3a1e6db7b9b16adf75fed550f05d0ce (diff) | |
download | gcc-267d3070f755138d967f6fd0c05b3c9ccb361aaf.zip gcc-267d3070f755138d967f6fd0c05b3c9ccb361aaf.tar.gz gcc-267d3070f755138d967f6fd0c05b3c9ccb361aaf.tar.bz2 |
Revert last patch.
From-SVN: r172763
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 84 |
1 files changed, 8 insertions, 76 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 8f198c6..d7d174f 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -43,45 +43,6 @@ along with GCC; see the file COPYING3. If not see #include "expr.h" #include "optabs.h" -/* Return true if load- or store-lanes optab OPTAB is implemented for - COUNT vectors of type VECTYPE. NAME is the name of OPTAB. */ - -static bool -vect_lanes_optab_supported_p (const char *name, convert_optab optab, - tree vectype, unsigned HOST_WIDE_INT count) -{ - enum machine_mode mode, array_mode; - bool limit_p; - - mode = TYPE_MODE (vectype); - limit_p = !targetm.array_mode_supported_p (mode, count); - array_mode = mode_for_size (count * GET_MODE_BITSIZE (mode), - MODE_INT, limit_p); - - if (array_mode == BLKmode) - { - if (vect_print_dump_info (REPORT_DETAILS)) - fprintf (vect_dump, "no array mode for %s[" HOST_WIDE_INT_PRINT_DEC "]", - GET_MODE_NAME (mode), count); - return false; - } - - if (convert_optab_handler (optab, array_mode, mode) == CODE_FOR_nothing) - { - if (vect_print_dump_info (REPORT_DETAILS)) - fprintf (vect_dump, "cannot use %s<%s><%s>", - name, GET_MODE_NAME (array_mode), GET_MODE_NAME (mode)); - return false; - } - - if (vect_print_dump_info (REPORT_DETAILS)) - fprintf (vect_dump, "can use %s<%s><%s>", - name, GET_MODE_NAME (array_mode), GET_MODE_NAME (mode)); - - return true; -} - - /* Return the smallest scalar part of STMT. This is used to determine the vectype of the stmt. We generally set the vectype according to the type of the result (lhs). For stmts whose @@ -3415,18 +3376,6 @@ vect_strided_store_supported (tree vectype, unsigned HOST_WIDE_INT count) } -/* Return TRUE if vec_store_lanes is available for COUNT vectors of - type VECTYPE. */ - -bool -vect_store_lanes_supported (tree vectype, unsigned HOST_WIDE_INT count) -{ - return vect_lanes_optab_supported_p ("vec_store_lanes", - vec_store_lanes_optab, - vectype, count); -} - - /* Function vect_permute_store_chain. Given a chain of interleaved stores in DR_CHAIN of LENGTH that must be @@ -3881,16 +3830,6 @@ vect_strided_load_supported (tree vectype, unsigned HOST_WIDE_INT count) return true; } -/* Return TRUE if vec_load_lanes is available for COUNT vectors of - type VECTYPE. */ - -bool -vect_load_lanes_supported (tree vectype, unsigned HOST_WIDE_INT count) -{ - return vect_lanes_optab_supported_p ("vec_load_lanes", - vec_load_lanes_optab, - vectype, count); -} /* Function vect_permute_load_chain. @@ -4038,28 +3977,19 @@ void vect_transform_strided_load (gimple stmt, VEC(tree,heap) *dr_chain, int size, gimple_stmt_iterator *gsi) { + stmt_vec_info stmt_info = vinfo_for_stmt (stmt); + gimple first_stmt = DR_GROUP_FIRST_DR (stmt_info); + gimple next_stmt, new_stmt; VEC(tree,heap) *result_chain = NULL; + unsigned int i, gap_count; + tree tmp_data_ref; /* DR_CHAIN contains input data-refs that are a part of the interleaving. RESULT_CHAIN is the output of vect_permute_load_chain, it contains permuted vectors, that are ready for vector computation. */ result_chain = VEC_alloc (tree, heap, size); + /* Permute. */ vect_permute_load_chain (dr_chain, size, stmt, gsi, &result_chain); - vect_record_strided_load_vectors (stmt, result_chain); - VEC_free (tree, heap, result_chain); -} - -/* RESULT_CHAIN contains the output of a group of strided loads that were - generated as part of the vectorization of STMT. Assign the statement - for each vector to the associated scalar statement. */ - -void -vect_record_strided_load_vectors (gimple stmt, VEC(tree,heap) *result_chain) -{ - gimple first_stmt = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)); - gimple next_stmt, new_stmt; - unsigned int i, gap_count; - tree tmp_data_ref; /* Put a permuted data-ref in the VECTORIZED_STMT field. Since we scan the chain starting from it's first node, their order @@ -4121,6 +4051,8 @@ vect_record_strided_load_vectors (gimple stmt, VEC(tree,heap) *result_chain) break; } } + + VEC_free (tree, heap, result_chain); } /* Function vect_force_dr_alignment_p. |