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

PR middle-end/56461
	* tree-vect-data-refs.c (vect_permute_load_chain): Avoid using copy
	method on dr_chain and result_chain.

From-SVN: r196325
This commit is contained in:
Jakub Jelinek 2013-02-27 23:06:21 +01:00 committed by Jakub Jelinek
parent a344216b4b
commit 3f292312f2
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2013-02-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56461
* tree-vect-data-refs.c (vect_permute_load_chain): Avoid using copy
method on dr_chain and result_chain.
PR middle-end/56461
* tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Call
pointer_set_destroy on not_executed_last_iteration.

View File

@ -4673,7 +4673,9 @@ vect_permute_load_chain (vec<tree> dr_chain,
unsigned nelt = TYPE_VECTOR_SUBPARTS (vectype);
unsigned char *sel = XALLOCAVEC (unsigned char, nelt);
*result_chain = dr_chain.copy ();
result_chain->quick_grow (length);
memcpy (result_chain->address (), dr_chain.address (),
length * sizeof (tree));
for (i = 0; i < nelt; ++i)
sel[i] = i * 2;
@ -4708,7 +4710,8 @@ vect_permute_load_chain (vec<tree> dr_chain,
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
(*result_chain)[j/2+length/2] = data_ref;
}
dr_chain = result_chain->copy ();
memcpy (dr_chain.address (), result_chain->address (),
length * sizeof (tree));
}
}