diff options
author | dorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-19 10:24:00 +0000 |
---|---|---|
committer | dorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-19 10:24:00 +0000 |
commit | 4a61a337a8b3bbfaef4cd25c60ea07df019afa3b (patch) | |
tree | ea695128e2e8754b43a2c74530a77e2dab617567 /gcc/tree.def | |
parent | c173930f46b58e578dd7bc5858078effdff01623 (diff) | |
download | gcc-4a61a337a8b3bbfaef4cd25c60ea07df019afa3b.tar.gz |
* 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_func_ptr): New function-pointer type.
* 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.
(vect_pattern_recog_funcs): New array of function pointers.
* 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. Added support for reduction patterns.
(vectorizable_reduction): Added support for reduction patterns.
(vect_transform_stmt): Added support for patterns.
* expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR.
* genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize.
* optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR.
(expand_widen_pattern_expr): New function.
(init_optabs): Initialize new optabs udot_prod_optab,
sdot_prod_optab.
* optabs.h (OTI_sdot_prod, OTI_udot_prod): New.
(sdot_prod_optab, udot_prod_optab): Define new optabs.
(expand_widen_pattern_expr): New function declaration.
* tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New
tree-codes.
* tree-inline.c (estimate_num_insns_1): Added cases for new
tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR.
* tree-pretty-print.c (dump_generic_node): Likewise.
(op_prio): Likewise.
(op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR.
* tree-ssa-operands.c (get_expr_operands): Added case for
DOT_PROD_EXPR.
* tree-vect-patterns.c (widened_name_p): New function.
(vect_recog_dot_prod_pattern): Added function implementation.
* tree-vect-transform.c (get_initial_def_for_reduction): Added
cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR.
* config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New.
* config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New.
* expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR.
* genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize.
* optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR.
(init_optabs): Initialize new optabs widen_ssum_optab,
widen_usum_optab.
* optabs.h (OTI_widen_ssum, OTI_widen_usum): New.
(widen_ssum_optab, widen_usum_optab): Define new optabs.
* tree-vect-generic.c: (expand_vector_operations_1): Check type of
use instead of type of def.
* tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added
function implementation.
* config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi,
widen_ssumv8hi): New.
* doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New
patterns.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109954 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.def')
-rw-r--r-- | gcc/tree.def | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/gcc/tree.def b/gcc/tree.def index 9e7e5b011d5..3cd03fd9f03 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -1,7 +1,7 @@ /* This file contains the definitions and documentation for the tree codes used in GCC. - Copyright (C) 1987, 1988, 1993, 1995, 1997, 1998, 2000, 2001, 2004, 2005 - Free Software Foundation, Inc. + Copyright (C) 1987, 1988, 1993, 1995, 1997, 1998, 2000, 2001, 2004, 2005, + 2006 Free Software Foundation, Inc. This file is part of GCC. @@ -1073,6 +1073,33 @@ DEFTREECODE (REDUC_MAX_EXPR, "reduc_max_expr", tcc_unary, 1) DEFTREECODE (REDUC_MIN_EXPR, "reduc_min_expr", tcc_unary, 1) DEFTREECODE (REDUC_PLUS_EXPR, "reduc_plus_expr", tcc_unary, 1) +/* Widenning dot-product. + The first two arguments are of type t1. + The third argument and the result are of type t2, such that t2 is at least + twice the size of t1. DOT_PROD_EXPR(arg1,arg2,arg3) is equivalent to: + tmp = WIDEN_MULT_EXPR(arg1, arg2); + arg3 = PLUS_EXPR (tmp, arg3); + or: + tmp = WIDEN_MULT_EXPR(arg1, arg2); + arg3 = WIDEN_SUM_EXPR (tmp, arg3); */ +DEFTREECODE (DOT_PROD_EXPR, "dot_prod_expr", tcc_expression, 3) + +/* Widenning summation. + The first argument is of type t1. + The second argument is of type t2, such that t2 is at least twice + the size of t1. The type of the entire expression is also t2. + WIDEN_SUM_EXPR is equivalent to first widening (promoting) + the first argument from type t1 to type t2, and then summing it + with the second argument. */ +DEFTREECODE (WIDEN_SUM_EXPR, "widen_sum_expr", tcc_binary, 2) + +/* Widenning multiplication. + The two arguments are of type t1. + The result is of type t2, such that t2 is at least twice + the size of t1. WIDEN_MULT_EXPR is equivalent to first widening (promoting) + the arguments from type t1 to type t2, and then multiplying them. */ +DEFTREECODE (WIDEN_MULT_EXPR, "widen_mult_expr", tcc_binary, 2) + /* Whole vector left/right shift in bits. Operand 0 is a vector to be shifted. Operand 1 is an integer shift amount in bits. */ |