From 78cd68c0af1ba80b29849712f8defe51fd232ee7 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 29 Oct 2019 14:52:42 +0100 Subject: Release function and edge summaries allocated with GGC. 2019-10-29 Martin Liska * ggc.h (ggc_alloc_no_dtor): New function. * ipa-fnsummary.c (ipa_free_fn_summary): Call destructor and ggc_free. (ipa_free_size_summary): Call delete instead of release. * ipa-fnsummary.h: Use new function ggc_alloc_no_dtor. * ipa-prop.c (ipa_check_create_edge_args): Likewise. (ipa_free_all_edge_args): Call destructor and ggc_free. (ipa_free_all_node_params): Likewise. (ipcp_free_transformation_sum): Likewise. * ipa-prop.h (ipa_check_create_node_params): Call new ggc_alloc_no_dtor. * ipa-sra.c (ipa_sra_generate_summary): Likewise. (ipa_sra_analysis): Call destructor and ggc_free. Replace release with delete operator. * symbol-summary.h (release): Remove .. (V>::~fast_function_summary): and move logic here. Likewise for other classes. From-SVN: r277572 --- gcc/ipa-sra.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/ipa-sra.c') diff --git a/gcc/ipa-sra.c b/gcc/ipa-sra.c index 836db40..038f38b 100644 --- a/gcc/ipa-sra.c +++ b/gcc/ipa-sra.c @@ -2546,7 +2546,7 @@ ipa_sra_generate_summary (void) gcc_checking_assert (!func_sums); gcc_checking_assert (!call_sums); func_sums - = (new (ggc_cleared_alloc ()) + = (new (ggc_alloc_no_dtor ()) ipa_sra_function_summaries (symtab, true)); call_sums = new ipa_sra_call_summaries (symtab); @@ -2805,7 +2805,7 @@ ipa_sra_read_summary (void) gcc_checking_assert (!func_sums); gcc_checking_assert (!call_sums); func_sums - = (new (ggc_cleared_alloc ()) + = (new (ggc_alloc_no_dtor ()) ipa_sra_function_summaries (symtab, true)); call_sums = new ipa_sra_call_summaries (symtab); @@ -3989,9 +3989,10 @@ ipa_sra_analysis (void) process_isra_node_results (node, clone_num_suffixes); delete clone_num_suffixes; - func_sums->release (); + func_sums->~ipa_sra_function_summaries (); + ggc_free (func_sums); func_sums = NULL; - call_sums->release (); + delete call_sums; call_sums = NULL; if (dump_file) -- cgit v1.1