diff options
author | Dorit Nuzman <dorit@il.ibm.com> | 2007-07-12 12:17:03 +0000 |
---|---|---|
committer | Dorit Nuzman <dorit@gcc.gnu.org> | 2007-07-12 12:17:03 +0000 |
commit | e95b59d2abbeea533bfcea315ed2b47412f21470 (patch) | |
tree | 85414467a7c6b6b6755c5dbe54511f8981c7db54 /gcc/target-def.h | |
parent | e1c8221962aa8dfba5b2462449bccfe10c2d561e (diff) | |
download | gcc-e95b59d2abbeea533bfcea315ed2b47412f21470.zip gcc-e95b59d2abbeea533bfcea315ed2b47412f21470.tar.gz gcc-e95b59d2abbeea533bfcea315ed2b47412f21470.tar.bz2 |
target.h (builtin_vectorization_cost): Add new target builtin.
2007-07-12 Dorit Nuzman <dorit@il.ibm.com>
* target.h (builtin_vectorization_cost): Add new target builtin.
* target-def.h (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): New.
* tree-vectorizer.h (TARG_SCALAR_STMT_COST): New.
(TARG_SCALAR_LOAD_COST, TARG_SCALAR_STORE_COST): New.
* tree-vect-analyze.c (vect_analyze_slp_instance): Initisliaze
uninitialized variables.
* tree-vect-transform.c (cost_for_stmt): New function.
(vect_estimate_min_profitable_iters): Call cost_for_stmt instead of
using cost 1 for all scalar stmts. Be less conservative when
estimating the number of prologue/epulogue iterations. Call
targetm.vectorize.builtin_vectorization_cost. Return
min_profitable_iters-1.
(vect_model_reduction_cost): Use TARG_SCALAR_TO_VEC_COST for
initialization cost instead of TARG_VEC_STMT_COST. Use
TARG_VEC_TO_SCALAR_COST instead of TARG_VEC_STMT_COST for reduction
epilogue code. Fix epilogue cost computation.
* config/spu/spu.c (spu_builtin_vectorization_cost): New.
(TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Implement.
* config/spu/spu.h (TARG_COND_BRANCH_COST, TARG_SCALAR_STMT_COST):
(TARG_SCALAR_LOAD_COST, TARG_SCALAR_STORE_COST, TARG_VEC_STMT_COST):
(TARG_VEC_TO_SCALAR_COST, TARG_SCALAR_TO_VEC, TARG_VEC_LOAD_COST):
(TARG_VEC_UNALIGNED_LOAD_COST, TARG_VEC_STORE_COST): Define.
2007-07-12 Dorit Nuzman <dorit@il.ibm.com>
* gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c: Loops now
get vectorized.
* gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c: Loops
now get vectorized.
* gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp: New.
* gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-31a.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-31b.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-31c.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-31d.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-iv-9.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-33.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-76a.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-76c.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-68a.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-68b.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-68c.c: New.
* gcc.dg/vect/costmodel/spu/costmodel-vect-68d.c: New.
* lib/target-supports.exp (check_effective_target_vect_int_mul):
Add spu.
From-SVN: r126584
Diffstat (limited to 'gcc/target-def.h')
-rw-r--r-- | gcc/target-def.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/target-def.h b/gcc/target-def.h index 31cb8f8..8942de7 100644 --- a/gcc/target-def.h +++ b/gcc/target-def.h @@ -356,6 +356,7 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. default_builtin_vectorized_conversion #define TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN 0 #define TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD 0 +#define TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST 0 #define TARGET_VECTORIZE \ { \ @@ -363,7 +364,8 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION, \ TARGET_VECTORIZE_BUILTIN_CONVERSION, \ TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN, \ - TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD \ + TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD, \ + TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST \ } #define TARGET_DEFAULT_TARGET_FLAGS 0 |