aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorIra Rosen <irar@il.ibm.com>2009-06-16 07:21:12 +0000
committerIra Rosen <irar@gcc.gnu.org>2009-06-16 07:21:12 +0000
commit7c5222ff1a2283b0f8c889da777c7dae5d4224ba (patch)
treeaaaf3e70f41a000974285e5e7f0db250fa701499 /gcc/tree-vectorizer.h
parent3ba558dba3cf0a581a1a70cf8e6de5c2d26dcf96 (diff)
downloadgcc-7c5222ff1a2283b0f8c889da777c7dae5d4224ba.zip
gcc-7c5222ff1a2283b0f8c889da777c7dae5d4224ba.tar.gz
gcc-7c5222ff1a2283b0f8c889da777c7dae5d4224ba.tar.bz2
tree-parloops.c (loop_parallel_p): Call vect_is_simple_reduction with additional parameter.
* tree-parloops.c (loop_parallel_p): Call vect_is_simple_reduction with additional parameter. * tree-vectorizer.h (enum vect_def_type): Add new value vect_nested_cycle. (enum vect_relevant): Add comments. (vect_is_simple_reduction): Add new argument. * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Add comments. Detect nested cycles. (vect_is_simple_reduction): Update documentation, add an argument to distinguish inner-loop reduction from nested cycle, detect nested cycles, fix printings and indentation, don't swap operands in case of nested cycle. (get_initial_def_for_reduction): Handle subtraction. (vect_create_epilog_for_reduction): Add new argument to specify reduction variable. (vect_finalize_reduction): Handle subtraction, fix comments. (vectorizable_reduction): Handle nested cycles. In case of nested cycle keep track of the reduction variable position. Call vect_is_simple_reduction with additional parameter. Use original statement code in reduction epilogue for nested cycle. Call vect_create_epilog_for_reduction with additional parameter. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Assert inner-loop vectorization. (vect_recog_widen_sum_pattern): Likewise. * tree-vect-stmts.c (process_use): Distinguish between nested cycles and reductions. (vect_mark_stmts_to_be_vectorized): Likewise. (vect_get_vec_def_for_operand): Handle nested cycles. From-SVN: r148518
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index c78e768..6e8f879 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -61,6 +61,7 @@ enum vect_def_type {
vect_internal_def,
vect_induction_def,
vect_reduction_def,
+ vect_nested_cycle,
vect_unknown_def_type
};
@@ -339,7 +340,11 @@ enum stmt_vec_info_type {
block. */
enum vect_relevant {
vect_unused_in_scope = 0,
+ /* The def is in the inner loop, and the use is in the outer loop, and the
+ use is a reduction stmt. */
vect_used_in_outer_by_reduction,
+ /* The def is in the inner loop, and the use is in the outer loop (and is
+ not part of reduction). */
vect_used_in_outer,
/* defs that feed computations that end up (only) in a reduction. These
@@ -817,7 +822,7 @@ extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
/* In tree-vect-loop.c. */
/* FORNOW: Used in tree-parloops.c. */
extern void destroy_loop_vec_info (loop_vec_info, bool);
-extern gimple vect_is_simple_reduction (loop_vec_info, gimple);
+extern gimple vect_is_simple_reduction (loop_vec_info, gimple, bool);
/* Drive for loop analysis stage. */
extern loop_vec_info vect_analyze_loop (struct loop *);
/* Drive for loop transformation stage. */