This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lno] [patch] vectorizer update - support constants.

The following patch to the vectorizer includes:

* Support for vectorization of constants (e.g, computations of the form
* A minor change in the naming scheme that allows more flexibility in
naming, and is more descriptive.
* Take TYPE_MIN_VALUE into account when checking alignment and initializing
array indexes (following the discussion in
* Temporarily restrict vectorizable data references to array references
with base VAR_DECL. As a result vectorization of ARRAY_REFS of the form
'(*p)[i]' (which is what gfortran produces) is not supported, until
alignment and aliasing is properly handled for these cases.
* Other minor fixes.

The tests cases are changed accordingly to reflect the new support for
vectorization of constants. Richard - I will address your comment about
having separate test cases ( in a separate

Used to bootstrap and pass the testsuite on powerpc-apple-darwin7.0.0
before the merge from tree-ssa.


        * (tree-vectorizer.o): Add dependency on real.h.
        * tree-vectorizer.c: (vect_is_simple_use): Allow constants.
        (real.h): Included to support constants vectorization.
        (vect_get_vec_def_for_operand): New function.
        (vect_transform_binop): Use above new function.
        (vect_transform_store): Likewise.
        (vect_transform_load): Likewise.

        (vect_get_new_vect_var): Allow more flexibility in naming scheme.
        (vect_create_index_for_array_ref): Call vect_get_new_vect_var with
        name prefix instead of a variable.
        (vect_create_data_ref): Likewise.
        (vect_create_destination_var): Likewise.

        (vect_analyze_data_refs): Temporarily restrict vectorizable data
        to ARRYA_RES which base is a VAR_DECL.
        (vect_create_data_ref): Support only VAR_DECL array base. Mark all
        vops for renaming.

        (vect_get_array_first_index): New function.
        (vect_create_index_for_array_ref): Consider array_first_index.
        (vect_analyze_data_ref_access): Likewise.

        (vect_get_loop_niters): Use number_of_iterations_in_loop.
        (vect_analyze_loop_form): Don't attempt to vectorize if
        number_of_iterations == 0.

        (vect_analyze_operations): Fix vectype analysis.

        (vect_create_index_for_array_ref): Fix code insertion in loop
        (vect_transform_loop_bound): Likewise.

(See attached file: vect_cst_diff)

Attachment: vect_cst_diff
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]