This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 4/6] Fix memory leak in loop_vec_info
- From: marxin <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 23 Nov 2015 14:48:40 +0100
- Subject: [PATCH 4/6] Fix memory leak in loop_vec_info
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1448286565 dot git dot mliska at suse dot cz>
- Resent-user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
gcc/ChangeLog:
2015-11-23 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.
---
gcc/tree-vect-loop-manip.c | 2 --
gcc/tree-vect-loop.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index c96e196..226b88f 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 41e5031..8f39578 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -1179,6 +1179,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)
--
2.6.3