This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[patch] [4.2 projects] vectorize reduction patterns - patch 2/n


Updates to the transformation phase of the vectorizer, to support patterns.

The changes to the function 'vect_create_epilog_for_reduction' are entirely
cosmetic (cleanups and documentation update). Functionality updates to this
functions are submitted separately in the next patch.

The changes to the function 'vectorizable_reduction' are about extending
this function to handle reduction patterns. Currently this function
supports reductions of the form:
      a = reduc_op (x, a)
i.e. - two arguments: arg0 is a "regular" use defined in the loop, and arg1
is the reduction variable (defined by the loop-header phi). Also the types
of all the arguments and the result is the same.
This patch extends this function to handle cases in which the reduction has
more than one "regular" use, the last argument is the reduction variable,
and the type of the reduction variable can be wider than the types of the
"regular" uses. Reduction idioms like dot-product and widening-summation
fit nicely into this form.

Bootstrapped with vectorization enabled and tested on the vectorizer tests
on powerpc-linux.

dorit

        * tree-vectorizer.h (ternary_op): New enum value.
        * tree-vect-transform.c (vect_create_epilog_for_reduction): Added
        declaration. Revised documentation. Removed redundant dump prints.
        Removed redundant argument.
        (vectorizable_reduction): Added support for reduction patterns.
        (vect_transform_stmt): Added support for patterns.

(See attached file: mainline.reduc_patterns2.txt)

Attachment: mainline.reduc_patterns2.txt
Description: Text document


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