Fix memory leak in loop_vec_info
authorMartin Liska <mliska@suse.cz>
Fri, 27 Nov 2015 08:37:23 +0000 (09:37 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 27 Nov 2015 08:37:23 +0000 (08:37 +0000)
* tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):
Do not release memory for comp_alias_ddrs.
* tree-vect-loop.c (destroy_loop_vec_info): Release
the memory for all loop_vec_info.

From-SVN: r230995

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

index cdb47f93bdcba0bfca5cd87913ceeb33fbe58a69..f83062c2d4e8f097f7f7ff3f2488ef48d0b6728a 100644 (file)
@@ -1,3 +1,10 @@
+2015-11-27  Martin Liska  <mliska@suse.cz>
+
+       * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):
+       Do not release memory for comp_alias_ddrs.
+       * tree-vect-loop.c (destroy_loop_vec_info): Release
+       the memory for all loop_vec_info.
+
 2015-11-27  Martin Liska  <mliska@suse.cz>
 
        * ipa-devirt.c (ipa_devirt): Use auto_vec instead
index c96e1967189755140ef80f6346b17eeea0221cb7..226b88feba21c08d6dd87eabbd57bd5103f7ba4c 100644 (file)
@@ -2284,8 +2284,6 @@ vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo, tree * cond_expr)
     dump_printf_loc (MSG_NOTE, vect_location,
                     "created %u versioning for alias checks.\n",
                     comp_alias_ddrs.length ());
-
-  comp_alias_ddrs.release ();
 }
 
 
index 7fb16f592605301d6d074b3ae17f83b3b9c15923..6719c9a899a318bef10cd454b3c04f7ac10c7b22 100644 (file)
@@ -1180,6 +1180,7 @@ destroy_loop_vec_info (loop_vec_info loop_vinfo, bool clean_stmts)
   free_dependence_relations (LOOP_VINFO_DDRS (loop_vinfo));
   LOOP_VINFO_LOOP_NEST (loop_vinfo).release ();
   LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo).release ();
+  LOOP_VINFO_COMP_ALIAS_DDRS (loop_vinfo).release ();
   LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo).release ();
   slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
   FOR_EACH_VEC_ELT (slp_instances, j, instance)