Commit 85b4d881 authored by Richard Biener's avatar Richard Biener
Browse files

Fix memory leaks

When changing the predcom pass to use auto_vec leaks were introduced by
failing to replace deallocation with C++ delete.  The following does
this.  It also fixes leaks in vectorization and range folding.

2022-03-24  Richard Biener  <rguenther@suse.de>

	* tree-predcom.cc (chain::chain): Add CTOR.
	(component::component): Likewise.
	(pcom_worker::release_chain): Use delete.
	(release_components): Likewise.
	(pcom_worker::filter_suitable_components): Likewise.
	(pcom_worker::split_data_refs_to_components): Use new.
	(make_invariant_chain): Likewise.
	(make_rooted_chain): Likewise.
	(pcom_worker::combine_chains): Likewise.
	* tree-vect-loop.cc (vect_create_epilog_for_reduction):
	Make sure to release previously constructed scalar_results.
	* tree-vect-stmts.cc (vectorizable_load): Use auto_vec
	for vec_offsets.
	* vr-values.cc (simplify_using_ranges::~simplify_using_ranges):
	Release m_flag_set_edges.
parent c1d233e3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment