re PR middle-end/56461 (GCC is leaking lots of memory)
PR middle-end/56461 * tree-vect-data-refs.c (vect_permute_store_chain): Avoid using copy method on dr_chain and result_chain. * tree-vect-stmts.c (vectorizable_store): Only call result_chain.create if j == 0. From-SVN: r196396
This commit is contained in:
parent
3b8af25b7a
commit
b6b9227d52
@ -1,5 +1,11 @@
|
||||
2013-03-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/56461
|
||||
* tree-vect-data-refs.c (vect_permute_store_chain): Avoid using copy
|
||||
method on dr_chain and result_chain.
|
||||
* tree-vect-stmts.c (vectorizable_store): Only call
|
||||
result_chain.create if j == 0.
|
||||
|
||||
PR middle-end/56461
|
||||
* tree-vect-stmts.c (vect_create_vectorized_promotion_stmts): Call
|
||||
vec_oprnds0->release (); rather than vec_oprnds0->truncate (0)
|
||||
|
@ -4218,7 +4218,9 @@ vect_permute_store_chain (vec<tree> dr_chain,
|
||||
unsigned int j, 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, n = nelt / 2; i < n; i++)
|
||||
{
|
||||
@ -4259,7 +4261,8 @@ vect_permute_store_chain (vec<tree> dr_chain,
|
||||
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
|
||||
(*result_chain)[2*j+1] = low;
|
||||
}
|
||||
dr_chain = result_chain->copy ();
|
||||
memcpy (dr_chain.address (), result_chain->address (),
|
||||
length * sizeof (tree));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4151,7 +4151,8 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
|
||||
new_stmt = NULL;
|
||||
if (grouped_store)
|
||||
{
|
||||
result_chain.create (group_size);
|
||||
if (j == 0)
|
||||
result_chain.create (group_size);
|
||||
/* Permute. */
|
||||
vect_permute_store_chain (dr_chain, group_size, stmt, gsi,
|
||||
&result_chain);
|
||||
|
Loading…
x
Reference in New Issue
Block a user