Commit Message

Hi!
Here is an updated version of the patch I've posted yesterday.
The changes since then are that the expander can now handle the CONSTRUCTORs
this patch creates (although we probably want to add some vec_concat
optab and at least improve handling of concatenation of two half sized
vectors into one larger one (say concatenate V4SImode and V4SImode into
V8SImode, etc.)), and allows vectorization of non-const elemental function
calls (including calls that have no lhs) in #pragma {,omp }simd loops.
Does this look good for gomp-4_0-branch?
2013-11-07 Jakub Jelinek <jakub@redhat.com>
* tree-vectorizer.h (enum stmt_vec_info_type): Add
call_simd_clone_vec_info_type.
* expr.c (store_constructor): Allow CONSTRUCTOR with VECTOR_TYPE
(same sized) elements even if the type of the CONSTRUCTOR has
vector mode and target is a REG.
* tree-vect-data-refs.c: Include cgraph.h.
(vect_analyze_data_refs): Inline by hand find_data_references_in_loop
and find_data_references_in_bb, if find_data_references_in_stmt
fails, still allow calls to #pragma omp declare simd functions
in #pragma omp simd loops unless they contain data references among
the call arguments or in lhs.
* tree-vect-loop.c (vect_determine_vectorization_factor): If a call
doesn't have lhs, set STMT_VINFO_VECTYPE to vector type corresponding
to any of the argument types and exclude it from adjustments of the
vectorization factor.
* tree-vect-stmts.c: Include tree-ssa-loop.h and
tree-scalar-evolution.h.
(vectorizable_function): Don't handle functions with simd clones here.
(vectorizable_call): Nor here. Return early if call doesn't have lhs.
(struct simd_call_arg_info): New type.
(vectorizable_simd_clone_call): New function.
(vect_analyze_stmt, vect_transform_stmt): Call it.
Jakub

Comments

On 11/08/13 07:10, Jakub Jelinek wrote:
> Hi!>> Here is an updated version of the patch I've posted yesterday.> The changes since then are that the expander can now handle the CONSTRUCTORs> this patch creates (although we probably want to add some vec_concat> optab and at least improve handling of concatenation of two half sized> vectors into one larger one (say concatenate V4SImode and V4SImode into> V8SImode, etc.)), and allows vectorization of non-const elemental function> calls (including calls that have no lhs) in #pragma {,omp }simd loops.
Thanks for working on this.
BTW, could you add some comments to your changes to
vect_analyze_data_refs? Actually, the entire function needs comments
throughout, but that's not your fault :).
Aldy