summaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorhjagasia <hjagasia@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-11 00:13:47 +0000
committerhjagasia <hjagasia@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-11 00:13:47 +0000
commit6202d4dbe64fab3147f67e6c836249f7e31ddd6c (patch)
treeac4783aa576a9af7b40d78f139e042b91e781996 /gcc/tree-vectorizer.h
parentc8ac5d9a0464767d7091606c4d55aaaf8edc511a (diff)
downloadgcc-6202d4dbe64fab3147f67e6c836249f7e31ddd6c.tar.gz
rsha Jagasia <harsha.jagasia@amd.com>
Jan Sjodin <jan.sjodin@amd.com> * tree-vect-analyze.c (vect_analyze_operations): Change comparison of loop iterations with threshold to less than or equal to instead of less than. Reduce min_scalar_loop_bound by one. * tree-vect-transform.c (vect_estimate_min_profitable_iters): Change prologue and epilogue iterations estimate to vf/2, when unknown at compile-time. Change versioning guard cost to taken_branch_cost. If peeling for alignment is unknown at compile-time, change peel guard costs to one taken branch and one not-taken branch per peeled loop. If peeling for alignment is known but number of scalar loop iterations is unknown at compile-time, change peel guard costs to one taken branch per peeled loop. Change the cost model equation to consider vector iterations as the loop iterations less the prologue and epilogue iterations. Change outside vector cost check to less than or equal to zero instead of equal to zero. (vect_do_peeling_for_loop_bound): Reduce min_scalar_loop_bound by one. * tree-vectorizer.h: Add TARG_COND_TAKEN_BRANCH_COST and TARG_COND_NOT_TAKEN_BRANCH_COST. * config/i386/i386.h (processor_costs): Add scalar_stmt_cost, scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost, scalar_to_vec_cost, vec_align_load_cost, vect_unalign_load_cost, vec_store_cost, cond_taken_branch_cost, cond_not_taken_branch_cost. Define macros for x86 costs. * config/i386/i386.c: (size_cost): Set scalar_stmt_cost, scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost, scalar_to_vec_cost, vec_align_load_cost, vect_unalign_load_cost, vec_store_cost, cond_taken_branch_cost, cond_not_taken_branch_cost to one. (i386_cost, i486_cost, pentium_cost, pentiumpro_cost, geode_cost, k6_cost, athlon_cost, pentium4_cost, nocona_cost, core2_cost, generic64_cost, generic32_cost): Set to default untuned costs. (k8_cost, amdfam10_cost): Costs for vectorization tuned. (x86_builtin_vectorization_cost): New. 2007-09-10 Harsha Jagasia <harsha.jagasia@amd.com> * gcc.dg/vect/costmodel/i386/costmodel-vect-31.c: Change dg-final to expect 1 non-profitable loop and 3 profitable loops. * gcc.dg/vect/costmodel/x86-64/costmodel-vect-31.c: Change dg-final to expect 1 non-profitable loop and 3 profitable loops. * gcc.dg/vect/costmodel/x86-64/costmodel-fast-math-vect-pr29925.c: Change dg-final to expect 1 profitable loop. * gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c: Change dg-final to expect 1 profitable loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128353 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 913c524137b..49ee0452378 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -469,9 +469,14 @@ typedef struct _stmt_vec_info {
/* These are some defines for the initial implementation of the vectorizer's
cost model. These will later be target specific hooks. */
-/* Cost of conditional branch. */
-#ifndef TARG_COND_BRANCH_COST
-#define TARG_COND_BRANCH_COST 3
+/* Cost of conditional taken branch. */
+#ifndef TARG_COND_TAKEN_BRANCH_COST
+#define TARG_COND_TAKEN_BRANCH_COST 3
+#endif
+
+/* Cost of conditional not taken branch. */
+#ifndef TARG_COND_NOT_TAKEN_BRANCH_COST
+#define TARG_COND_NOT_TAKEN_BRANCH_COST 1
#endif
/* Cost of any scalar operation, excluding load and store. */