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
This commit is contained in:
Martin Liska 2015-11-27 09:37:23 +01:00 committed by Martin Liska
parent ed37a6cf23
commit 5cd366f386
3 changed files with 8 additions and 2 deletions

View 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

View 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 ();
}

View 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)