[PATCH GCC]Fix memory leak and wrong invariant dependence computation in IVOPT

Bin Cheng bin.cheng@arm.com
Wed Oct 28 03:03:00 GMT 2015


Hi,
When address iv uses grouping was introduced, I also introduced memory leak
and wrong computation of depends_on bitmap.  The intention is to skip
`depends_on' computation for sub address type iv uses.  Unfortunately, the
code is wrong because depends_on is freed in subsequent calls to
get_computation_cost for a grouped iv use.  This results in loss of
depends_on information, as well memory leaks for depends_on bitmap.

I think this is an obvious fix to the issue.  Bootstrap and test on x86_64.
OK?

Thanks,
bin

2015-10-27  Bin Cheng  <bin.cheng@arm.com>

	* tree-ssa-loop-ivopts.c (split_address_cost): Check depends_on.
	(get_computation_cost_at): Ditto.
	(determine_use_iv_cost_address): Pass NULL for arguments depends_on
	and inv_expr_id.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ivopts-depends_on-20151026.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151028/bbab3abd/attachment.txt>


More information about the Gcc-patches mailing list