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] | |
This series of patches brings over the vectorization of reduction patterns,
such as dot-product and widening-summation, from autovect-branch.
* Patch1: Updated to the analysis phase of the vectorizer, to support
pattern detection in general.
* Patches 2,3: Updates to the transformation phase of the vectorizer, to
support patterns in general.
* Patch 4,5: Add support for specific reduction patterns - dot-product and
widening-summation.
* Additional patches that add support for additional non-reduction patterns
may be submitted later on.
Patches 1-4 were bootstrapped (with vectorization enabled) together and
tested on the vectorizer testcases both on powerpc-linux and
i686-pc-linux-gnu. Individual patches were bootstrapped and tested on
powerpc-linux only.
Attached is the first patch:
A new file - tree-vect-patterns.c - is added, where all the pattern
recognition for vectorizer specific patterns takes place. Currently the
file includes the general pattern-recognition driver (vect_pattern_recog
and vect_patern_recog_1), and prototypes for three pattern-recognition
functions that are not yet implemented (implementation for these functions
will be provided in following patches) .
During vect_pattern_recog, if a sequence of stmts {s1,s2,s3} is detected as
a certain idiom, we add a new stmt that represents that idiom (the "pattern
stmt") before the last stmt in the sequence (s3), we mark that s3 is
"in_pattern", and we record a pointer from s3 to the pattern-stmt and back.
Later on, when we reach s3 during our bottom-up analysis to mark stmts that
are relevant for vectorization (in vect_mark_relevant), we do not mark s3
as relevant, and s3 would not cause the defs of its operands to be marked
as relevant. Instead, the new pattern-stmt will be marked as relevant and
the defs of its operands will be marked as relevant (this way, if the stmts
of the sequence are not used by any other stmt but s3, they will not be
vectorized; only the pattern-stmt will be vectorized).
Bootstrapped with vectorization enabled and tested on the vectorizer tests
on powerpc-linux.
dorit
* Makefile.in (tree-vect-patterns.o): Add rule for new file.
* tree-vect-analyze.c (vect_determine_vectorization_factor): Use
existing STMT_VINFO_VECTYPE if available.
(vect_mark_relevant): Add special handling for stmts that are
marked as
STMT_VINFO_IN_PATTERN_P.
(vect_analyze_loop): Call vect_pattern_recog.
* tree-vectorizer.c (new_stmt_vec_info): Initialize new fields.
* tree-vectorizer.h (in_pattern_p, related_stmt): New fields in
stmt_info.
(STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros.
(vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern):
(vect_recog_dot_prod_pattern, vect_pattern_recog): New function
declarations.
(_recog_func_ptr): New function-pointer type.
(vect_pattern_recog_funcs): New array of function pointers.
* tree-vect-patterns.c: New file.
(vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern):
(vect_recog_dot_prod_pattern, vect_pattern_recog):
(vect_pattern_recog_1): New functions.
Patch:
(See attached file: mainline.reduc_patterns1.txt)Attachment:
mainline.reduc_patterns1.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |