This fixes some memleaks, one older, one recently introduced.
2020-10-29 Richard Biener <rguenther@suse.de>
* tree-ssa-pre.c (compute_avail): Free operands consistently.
* tree-vect-loop.c (vectorizable_phi): Make sure all operand
defs vectors are released.
adding the reference to EXP_GEN. */
if (BB_MAY_NOTRETURN (block)
&& vn_reference_may_trap (ref))
- continue;
+ {
+ operands.release ();
+ continue;
+ }
/* If the value of the reference is not invalidated in
this block until it is computed, add the expression
tree scalar_dest = gimple_phi_result (stmt_info->stmt);
basic_block bb = gimple_bb (stmt_info->stmt);
tree vec_dest = vect_create_destination_var (scalar_dest, vectype);
- auto_vec<tree> vec_oprnds;
auto_vec<gphi *> new_phis;
for (unsigned i = 0; i < gimple_phi_num_args (stmt_info->stmt); ++i)
{
&& SLP_TREE_VEC_STMTS (child).is_empty ())
continue;
+ auto_vec<tree> vec_oprnds;
vect_get_slp_defs (SLP_TREE_CHILDREN (slp_node)[i], &vec_oprnds);
if (!new_phis.exists ())
{