From: Martin Liska Date: Fri, 27 Nov 2015 08:37:23 +0000 (+0100) Subject: Fix memory leak in loop_vec_info X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5cd366f386830aa300e288086463545924d6f727;p=gcc.git Fix memory leak in loop_vec_info * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cdb47f93bdc..f83062c2d4e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-11-27 Martin Liska + + * 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 * ipa-devirt.c (ipa_devirt): Use auto_vec instead diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index c96e1967189..226b88feba2 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -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 (); } diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 7fb16f59260..6719c9a899a 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -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)