re PR middle-end/56461 (GCC is leaking lots of memory)

PR middle-end/56461
	* tree-vect-loop.c (destroy_loop_vec_info): For !clean_stmts, just
	set nbbs to 0 instead of having separate code path.
	(vect_analyze_loop_form): Call destroy_loop_vec_info with true
	instead of false as last argument if returning NULL.

From-SVN: r196424
This commit is contained in:
Jakub Jelinek 2013-03-04 11:02:26 +01:00 committed by Jakub Jelinek
parent a4f1e7052a
commit 541d9ac892
2 changed files with 10 additions and 16 deletions

View File

@ -1,3 +1,11 @@
2013-03-04 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56461
* tree-vect-loop.c (destroy_loop_vec_info): For !clean_stmts, just
set nbbs to 0 instead of having separate code path.
(vect_analyze_loop_form): Call destroy_loop_vec_info with true
instead of false as last argument if returning NULL.
2013-03-03 Sandra Loosemore <sandra@codesourcery.com>
* target.def (TARGET_OPTION_VALID_ATTRIBUTE_P): Update comments;

View File

@ -905,23 +905,9 @@ destroy_loop_vec_info (loop_vec_info loop_vinfo, bool clean_stmts)
loop = LOOP_VINFO_LOOP (loop_vinfo);
bbs = LOOP_VINFO_BBS (loop_vinfo);
nbbs = loop->num_nodes;
nbbs = clean_stmts ? loop->num_nodes : 0;
swapped = LOOP_VINFO_OPERANDS_SWAPPED (loop_vinfo);
if (!clean_stmts)
{
free (LOOP_VINFO_BBS (loop_vinfo));
free_data_refs (LOOP_VINFO_DATAREFS (loop_vinfo));
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_MAY_ALIAS_DDRS (loop_vinfo).release ();
free (loop_vinfo);
loop->aux = NULL;
return;
}
for (j = 0; j < nbbs; j++)
{
basic_block bb = bbs[j];
@ -1244,7 +1230,7 @@ vect_analyze_loop_form (struct loop *loop)
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"not vectorized: number of iterations = 0.");
if (inner_loop_vinfo)
destroy_loop_vec_info (inner_loop_vinfo, false);
destroy_loop_vec_info (inner_loop_vinfo, true);
return NULL;
}