diff options
author | Harsha Jagasia <harsha.jagasia@amd.com> | 2007-06-08 16:30:49 +0000 |
---|---|---|
committer | Harsha Jagasia <hjagasia@gcc.gnu.org> | 2007-06-08 16:30:49 +0000 |
commit | 792ed98bb712d700adcbde5549704b74cca59eb2 (patch) | |
tree | b261d3382cad73cc9bf2627a1ef52c49c881835e /gcc/common.opt | |
parent | c8e2516ccf14cbd0b22e8a2bd0685e120a32a1d1 (diff) | |
download | gcc-792ed98bb712d700adcbde5549704b74cca59eb2.zip gcc-792ed98bb712d700adcbde5549704b74cca59eb2.tar.gz gcc-792ed98bb712d700adcbde5549704b74cca59eb2.tar.bz2 |
extend.texi: Add fvect-cost-model flag.
gcc/ChangeLog:
2007-06-08 Harsha Jagasia <harsha.jagasia@amd.com>
Tony Linthicum <tony.linthicum@amd.com>
* doc/extend.texi: Add fvect-cost-model flag.
* common.opt (fvect-cost-model): New flag.
* tree-vectorizer.c (new_stmt_vec_info): Initialize inside and outside
cost fields in stmt_vec_info struct for STMT.
* tree-vectorizer.h (stmt_vec_info): Define inside and outside cost
fields in stmt_vec_info struct and access functions for the same.
(TARG_COND_BRANCH_COST): Define cost of conditional branch.
(TARG_VEC_STMT_COST): Define cost of any vector operation, excluding
load, store and vector to scalar operation.
(TARG_VEC_TO_SCALAR_COST): Define cost of vector to scalar operation.
(TARG_VEC_LOAD_COST): Define cost of aligned vector load.
(TARG_VEC_UNALIGNED_LOAD_COST): Define cost of misasligned vector load.
(TARG_VEC_STORE_COST): Define cost of vector store.
(vect_estimate_min_profitable_iters): Define new function.
* tree-vect-analyze.c (vect_analyze_operations): Add a compile-time
check to evaluate if loop iterations are less than minimum profitable
iterations determined by cost model or minimum vect loop bound defined
by user, whichever is more conservative.
* tree-vect-transform.c (vect_do_peeling_for_loop_bound): Add a
run-time check to evaluate if loop iterations are less than minimum
profitable iterations determined by cost model or minimum vect loop
bound defined by user, whichever is more conservative.
(vect_estimate_min_profitable_iterations): New function to estimate
mimimimum iterartions required for vector version of loop to be
profitable over scalar version.
(vect_model_reduction_cost): New function.
(vect_model_induction_cost): New function.
(vect_model_simple_cost): New function.
(vect_cost_strided_group_size): New function.
(vect_model_store_cost): New function.
(vect_model_load_cost): New function.
(vectorizable_reduction): Call vect_model_reduction_cost during
analysis phase.
(vectorizable_induction): Call vect_model_induction_cost during
analysis phase.
(vectorizable_load): Call vect_model_load_cost during analysis phase.
(vectorizable_store): Call vect_model_store_cost during analysis phase.
(vectorizable_call, vectorizable_assignment, vectorizable_operation,
vectorizable_promotion, vectorizable_demotion): Call
vect_model_simple_cost during analysis phase.
gcc/testsuite/ChangeLog:
2007-06-08 Harsha Jagasia <harsha.jagasia@amd.com>
* gcc.dg/vect/costmodel: New directory.
* gcc.dg/vect/costmodel/i386: New directory.
* gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp: New testsuite.
* gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c:
New test.
* gcc.dg/vect/costmodel/i386/costmodel-vect-31.c: New test.
* gcc.dg/vect/costmodel/i386/costmodel-vect-33.c: New test.
* gcc.dg/vect/costmodel/i386/costmodel-vect-68.c: New test.
* gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c: New test.
* gcc.dg/vect/costmodel/x86_64: New directory.
* gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp:
New testsuite.
* gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c:
New test.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c: New test.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-33.c: New test.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-68.c: New test.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c: New test.
* gcc.dg/vect/costmodel/x86_64/costmodel-pr30843.c: New test.
Co-Authored-By: Tony Linthicum <tony.linthicum@amd.com>
From-SVN: r125575
Diffstat (limited to 'gcc/common.opt')
-rw-r--r-- | gcc/common.opt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/common.opt b/gcc/common.opt index 2358bc4..6299573 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1110,6 +1110,10 @@ ftree-vectorize Common Report Var(flag_tree_vectorize) Optimization Enable loop vectorization on trees +fvect-cost-model +Common Report Var(flag_vect_cost_model) Optimization +Enable use of cost model in vectorization + ftree-vect-loop-version Common Report Var(flag_tree_vect_loop_version) Init(1) Optimization Enable loop versioning when doing loop vectorization on trees |