aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-03-05 10:57:09 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-03-05 10:57:09 +0000
commitf9be04cd95886e9e04213131469f9fb2c62a9d87 (patch)
tree770dfc86ef282949c7880c0d291120a357cbca83 /gcc
parentc1c5a431b52c85d485b65756d3ecce60875bee1e (diff)
downloadgcc-f9be04cd95886e9e04213131469f9fb2c62a9d87.zip
gcc-f9be04cd95886e9e04213131469f9fb2c62a9d87.tar.gz
gcc-f9be04cd95886e9e04213131469f9fb2c62a9d87.tar.bz2
re PR tree-optimization/26420 (-ftree-vectorizer-verbose=1 prints unvectorized loops information)
2007-03-05 Richard Guenther <rguenther@suse.de> Dorit Nuzman <dorit@il.ibm.com> PR tree-optimization/26420 * tree-vectorizer.c (vectorize_loops): Bail out early if there are no loops in the function. Only print the number of vectorized loops if it is greater than zero or we are supposed to print information about unvectorized loops. Co-Authored-By: Dorit Nuzman <dorit@il.ibm.com> From-SVN: r122544
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/tree-vectorizer.c11
2 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5b125fd..0b6a01d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2007-03-05 Richard Guenther <rguenther@suse.de>
+ Dorit Nuzman <dorit@il.ibm.com>
+
+ PR tree-optimization/26420
+ * tree-vectorizer.c (vectorize_loops): Bail out early if there
+ are no loops in the function. Only print the number of
+ vectorized loops if it is greater than zero or we are supposed
+ to print information about unvectorized loops.
+
2007-03-05 Revital Eres <eres@il.ibm.com>
* gcc.dg/var-expand1.c: New test.
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 2a53b9c..b0aedf7 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -2196,6 +2196,12 @@ vectorize_loops (void)
loop_iterator li;
struct loop *loop;
+ vect_loops_num = number_of_loops ();
+
+ /* Bail out if there are no loops. */
+ if (vect_loops_num <= 1)
+ return 0;
+
/* Fix the verbosity level if not defined explicitly by the user. */
vect_set_dump_settings ();
@@ -2208,7 +2214,6 @@ vectorize_loops (void)
/* If some loop was duplicated, it gets bigger number
than all previously defined loops. This fact allows us to run
only over initial loops skipping newly generated ones. */
- vect_loops_num = number_of_loops ();
FOR_EACH_LOOP (li, loop, 0)
{
loop_vec_info loop_vinfo;
@@ -2225,7 +2230,9 @@ vectorize_loops (void)
}
vect_loop_location = UNKNOWN_LOC;
- if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS))
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)
+ || (vect_print_dump_info (REPORT_VECTORIZED_LOOPS)
+ && num_vectorized_loops > 0))
fprintf (vect_dump, "vectorized %u loops in function.\n",
num_vectorized_loops);