summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-analyze.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-06 16:18:55 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-06 16:18:55 +0000
commit82ba6513749be5294e8b40323322a2add4681310 (patch)
treeeabb8bb49cc28e95fea4f091f4b02dd6cac4ad30 /gcc/tree-vect-analyze.c
parent8a58ed0af38bbe49d77d45122f8fc503d14ea055 (diff)
downloadgcc-82ba6513749be5294e8b40323322a2add4681310.tar.gz
2007-12-05 Harsha Jagasia <harsha.jagasia@amd.com>
* tree-vectorizer.c (slpeel_add_loop_guard): Gimplify the condition. (set_prologue_iterations): New. Set the prologue iterations to total number of scalar iterations if the cost model check indicates that scalar code should be generated. (slpeel_tree_peel_loop_to_edge): Add a new parameter and code for generating the cost condition for epilog. Call set_prologue_iterations to generate cost condition for prolog. (new_loop_vec_info): Initialize LOOP_VINFO_NITERS_UNCHANGED. * tree-vectorizer.h (LOOP_VINFO_NITERS_UNCHANGED): New. (slpeel_tree_peel_loop_to_edge): Update declaration. (set_prologue_iterations): New declaration. * tree-vect-analyze.c (vect_analyze_loop_form): Update LOOP_VINFO_NITERS_UNCHANGED. * tree-vect-transform.c (vect_estimate_min_profitable_iters): Add new parameter and code to check if run time cost model test is needed. Remove code that adds builtin vectorization cost to scalar outside cost for the run time cost model test. If run time cost model test is needed add the appropriate guard cost to the scalar outside cost. The guard cost depends on whether the guard is generated at versioning or at prolog generation or at epilog generation. Change cost model equation to include scalar outside cost. (conservative_cost_threshold): New. Return the less conservative profitability threshold between the cost model threshold and the user defined vectorization threshold. (vect_do_peeling_for_loop_bound): Call conservative_cost_threshold. (vect_do_peeling_for_alignment): Same. (vect_loop_versioning): Same. (vect_create_cond_for_align_checks): ANDs the cost model condition with the alignment condition. (vect_transform_loop): Call loop versioning only when there is a misalignment or an aliasing problem. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130651 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r--gcc/tree-vect-analyze.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index f741903b718..3e8002f172b 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -602,6 +602,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo)
min_profitable_iters = vect_estimate_min_profitable_iters (loop_vinfo);
LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo) = min_profitable_iters;
+
if (min_profitable_iters < 0)
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
@@ -4216,6 +4217,7 @@ vect_analyze_loop_form (struct loop *loop)
loop_vinfo = new_loop_vec_info (loop);
LOOP_VINFO_NITERS (loop_vinfo) = number_of_iterations;
+ LOOP_VINFO_NITERS_UNCHANGED (loop_vinfo) = number_of_iterations;
STMT_VINFO_TYPE (vinfo_for_stmt (loop_cond)) = loop_exit_ctrl_vec_info_type;