]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/56461 (GCC is leaking lots of memory)
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 Mar 2013 09:37:56 +0000 (10:37 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 5 Mar 2013 09:37:56 +0000 (10:37 +0100)
PR middle-end/56461
* tree-vect-stmts.c (free_stmt_vec_info_vec): Call
free_stmt_vec_info on any left-over stmt_vec_info in the vector.
* tree-vect-loop.c (vect_create_epilog_for_reduction): Release
inner_phis vector.

From-SVN: r196453

gcc/ChangeLog
gcc/tree-vect-loop.c
gcc/tree-vect-stmts.c

index 56d6b41f629735e9a6a6df19a7525aa3775ff21a..bc0500cb115e848bb6476735198ff8900e202190 100644 (file)
@@ -1,3 +1,11 @@
+2013-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/56461
+       * tree-vect-stmts.c (free_stmt_vec_info_vec): Call
+       free_stmt_vec_info on any left-over stmt_vec_info in the vector.
+       * tree-vect-loop.c (vect_create_epilog_for_reduction): Release
+       inner_phis vector.
+
 2013-03-05  Richard Biener  <rguenther@suse.de>
 
        PR lto/56515
index 8be53bb02c8875e7b49aecdf83e2afd74ab63972..1252c5a04fc06f332276bc474dd8f72dc6192356 100644 (file)
@@ -4487,8 +4487,9 @@ vect_finalize_reduction:
     }
 
   scalar_results.release ();
+  inner_phis.release ();
   new_phis.release ();
-} 
+}
 
 
 /* Function vectorizable_reduction.
index e5604fa6fea481cd215996a450f5615084fb1875..a7144288f1ffae4c98df21235b3891002a1688a7 100644 (file)
@@ -5969,6 +5969,11 @@ init_stmt_vec_info_vec (void)
 void
 free_stmt_vec_info_vec (void)
 {
+  unsigned int i;
+  vec_void_p info;
+  FOR_EACH_VEC_ELT (stmt_vec_info_vec, i, info)
+    if (info != NULL)
+      free_stmt_vec_info (STMT_VINFO_STMT ((stmt_vec_info) info));
   gcc_assert (stmt_vec_info_vec.exists ());
   stmt_vec_info_vec.release ();
 }