summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-transform.c
diff options
context:
space:
mode:
authordorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-14 12:42:40 +0000
committerdorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-14 12:42:40 +0000
commit8964b5be03c9f48198829e79ace6a84122004bcf (patch)
treec1d065e5ba09e4c5a85904acf9038d65101037cd /gcc/tree-vect-transform.c
parent67ed5d34a0744ef637049974b3508165e62d1a69 (diff)
downloadgcc-8964b5be03c9f48198829e79ace6a84122004bcf.tar.gz
* param.h (MIN_VECT_LOOP_BOUND): New.
* params.def (MIN_VECT_LOOP_BOUND): New. * tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Takes another argument - minimum threshold for number of iterations. * tree-vectorizer.h (slpeel_tree_peel_loop_to_edge): Add another argument to declaration. * tree-vect-analyze.c (vect_analyze_operations): Check value of MIN_VECT_LOOP_BOUND. * tree-vect-transform.c (vect_do_peeling_for_loop_bound): Call slpeel_tree_peel_loop_to_edge with additional argument. (vect_do_peeling_for_alignment): Likewise. * doc/invoke.texi (min-vect-loop-bound): Document new param option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-transform.c')
-rw-r--r--gcc/tree-vect-transform.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index ec3f511e74e..70fa217453a 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -35,6 +35,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "cfgloop.h"
#include "expr.h"
#include "optabs.h"
+#include "params.h"
#include "recog.h"
#include "tree-data-ref.h"
#include "tree-chrec.h"
@@ -4276,6 +4277,7 @@ vect_do_peeling_for_loop_bound (loop_vec_info loop_vinfo, tree *ratio)
edge update_e;
basic_block preheader;
int loop_num;
+ unsigned int th;
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "=== vect_do_peeling_for_loop_bound ===");
@@ -4291,8 +4293,11 @@ vect_do_peeling_for_loop_bound (loop_vec_info loop_vinfo, tree *ratio)
&ratio_mult_vf_name, ratio);
loop_num = loop->num;
+ /* Threshold for vectorized loop. */
+ th = (PARAM_VALUE (PARAM_MIN_VECT_LOOP_BOUND)) *
+ LOOP_VINFO_VECT_FACTOR (loop_vinfo);
new_loop = slpeel_tree_peel_loop_to_edge (loop, single_exit (loop),
- ratio_mult_vf_name, ni_name, false);
+ ratio_mult_vf_name, ni_name, false, th);
gcc_assert (new_loop);
gcc_assert (loop_num == loop->num);
#ifdef ENABLE_CHECKING
@@ -4517,7 +4522,7 @@ vect_do_peeling_for_alignment (loop_vec_info loop_vinfo)
/* Peel the prolog loop and iterate it niters_of_prolog_loop. */
new_loop =
slpeel_tree_peel_loop_to_edge (loop, loop_preheader_edge (loop),
- niters_of_prolog_loop, ni_name, true);
+ niters_of_prolog_loop, ni_name, true, 0);
gcc_assert (new_loop);
#ifdef ENABLE_CHECKING
slpeel_verify_cfg_after_peeling (new_loop, loop);