fix vectorizer memleaks
This plugs two memleaks in the vectorizer. 2021-01-08 Richard Biener <rguenther@suse.de> * tree-vect-slp.c (scalar_stmts_to_slp_tree_map_t): Fix. (vect_build_slp_tree): On cache hit release the matched scalar stmts vector. * tree-vect-stmts.c (vectorizable_store): Properly free vec_oprnds before possibly gathering them again.
This commit is contained in:
parent
bdcde15045
commit
b407f233d7
@ -1378,7 +1378,7 @@ bst_traits::equal (value_type existing, value_type candidate)
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef hash_map <vec <gimple *>, slp_tree,
|
||||
typedef hash_map <vec <stmt_vec_info>, slp_tree,
|
||||
simple_hashmap_traits <bst_traits, slp_tree> >
|
||||
scalar_stmts_to_slp_tree_map_t;
|
||||
|
||||
@ -1405,6 +1405,7 @@ vect_build_slp_tree (vec_info *vinfo,
|
||||
{
|
||||
SLP_TREE_REF_COUNT (*leader)++;
|
||||
vect_update_max_nunits (max_nunits, (*leader)->max_nunits);
|
||||
stmts.release ();
|
||||
}
|
||||
return *leader;
|
||||
}
|
||||
|
@ -7717,11 +7717,11 @@ vectorizable_store (vec_info *vinfo,
|
||||
}
|
||||
}
|
||||
next_stmt_info = DR_GROUP_NEXT_ELEMENT (next_stmt_info);
|
||||
vec_oprnds.release ();
|
||||
if (slp)
|
||||
break;
|
||||
}
|
||||
|
||||
vec_oprnds.release ();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user