diff options
author | Richard Guenther <rguenther@suse.de> | 2012-04-18 11:33:51 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-04-18 11:33:51 +0000 |
commit | 03fd03d5bcb647dac06dd8e30a4660d4621e1d2e (patch) | |
tree | d299681460344c4e494414f353c180e1a1bad1d5 /gcc/tree-vect-loop-manip.c | |
parent | 89fcabafa13d82c44c87b745d08de04386c5b15f (diff) | |
download | gcc-03fd03d5bcb647dac06dd8e30a4660d4621e1d2e.zip gcc-03fd03d5bcb647dac06dd8e30a4660d4621e1d2e.tar.gz gcc-03fd03d5bcb647dac06dd8e30a4660d4621e1d2e.tar.bz2 |
re PR tree-optimization/44688 (Excessive code-size growth at -O3)
2012-04-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44688
* cfgloop.h (record_niter_bound): Declare.
* tree-ssa-loop-niter.c (record_niter_bound): Export.
Update the estimation with the upper bound here...
(estimate_numbers_of_iterations_loop): ... instead of here.
Do not forcefully reset a recorded upper bound.
* tree-vect-loop-manip.c (vect_do_peeling_for_alignment):
Record the maximum number of loop iterations of the
prologue loop.
From-SVN: r186566
Diffstat (limited to 'gcc/tree-vect-loop-manip.c')
-rw-r--r-- | gcc/tree-vect-loop-manip.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 499dece..18eef98 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -2167,6 +2167,7 @@ vect_do_peeling_for_alignment (loop_vec_info loop_vinfo) struct loop *new_loop; unsigned int th = 0; int min_profitable_iters; + int max_iter; if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_do_peeling_for_alignment ==="); @@ -2192,6 +2193,11 @@ vect_do_peeling_for_alignment (loop_vec_info loop_vinfo) #ifdef ENABLE_CHECKING slpeel_verify_cfg_after_peeling (new_loop, loop); #endif + max_iter = MAX (LOOP_VINFO_VECT_FACTOR (loop_vinfo) - 1, (int) th); + record_niter_bound (new_loop, shwi_to_double_int (max_iter), false, true); + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, "Setting upper bound of nb iterations for prologue " + "loop to %d\n", max_iter); /* Update number of times loop executes. */ n_iters = LOOP_VINFO_NITERS (loop_vinfo); |