aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-parloops.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2015-11-23 09:45:38 +0000
committerTom de Vries <vries@gcc.gnu.org>2015-11-23 09:45:38 +0000
commit1cabb204394a2369ee7deeb518cbed038b33939b (patch)
tree006bc81b651c60e115e889c4144c6d622ef16fda /gcc/tree-parloops.c
parentb59e2a4903fa1ac8c3b34338a62b1e3fb15c3792 (diff)
downloadgcc-1cabb204394a2369ee7deeb518cbed038b33939b.zip
gcc-1cabb204394a2369ee7deeb518cbed038b33939b.tar.gz
gcc-1cabb204394a2369ee7deeb518cbed038b33939b.tar.bz2
Always call free_stmt_vec_info_vec in gather_scalar_reductions
2015-11-23 Tom de Vries <tom@codesourcery.com> PR tree-optimization/68460 * tree-parloops.c (gather_scalar_reductions): Also call free_stmt_vec_info_vec if simple_loop_info == NULL. * gcc.dg/autopar/pr68460.c: New test. From-SVN: r230742
Diffstat (limited to 'gcc/tree-parloops.c')
-rw-r--r--gcc/tree-parloops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index aca2370..9b564ca 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -2433,7 +2433,7 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list
simple_loop_info = vect_analyze_loop_form (loop);
if (simple_loop_info == NULL)
- return;
+ goto gather_done;
for (gsi = gsi_start_phis (loop->header); !gsi_end_p (gsi); gsi_next (&gsi))
{
@@ -2492,9 +2492,13 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list
destroy_loop_vec_info (simple_loop_info, true);
destroy_loop_vec_info (simple_inner_loop_info, true);
+ gather_done:
/* Release the claim on gimple_uid. */
free_stmt_vec_info_vec ();
+ if (reduction_list->elements () == 0)
+ return;
+
/* As gimple_uid is used by the vectorizer in between vect_analyze_loop_form
and free_stmt_vec_info_vec, we can set gimple_uid of reduc_phi stmts only
now. */