aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-10-29 14:52:42 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-10-29 13:52:42 +0000
commit78cd68c0af1ba80b29849712f8defe51fd232ee7 (patch)
tree610d5431c2e3c5f0a8416e42ba955c1b1ce294b0 /gcc/ipa-prop.c
parent318bd8c60d83ca294b237559908dd9f88ee7c300 (diff)
downloadgcc-78cd68c0af1ba80b29849712f8defe51fd232ee7.zip
gcc-78cd68c0af1ba80b29849712f8defe51fd232ee7.tar.gz
gcc-78cd68c0af1ba80b29849712f8defe51fd232ee7.tar.bz2
Release function and edge summaries allocated with GGC.
2019-10-29 Martin Liska <mliska@suse.cz> * 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
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 0dd73561..9dfbe1a 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -3719,7 +3719,7 @@ ipa_check_create_edge_args (void)
{
if (!ipa_edge_args_sum)
ipa_edge_args_sum
- = (new (ggc_cleared_alloc <ipa_edge_args_sum_t> ())
+ = (new (ggc_alloc_no_dtor<ipa_edge_args_sum_t> ())
ipa_edge_args_sum_t (symtab, true));
if (!ipa_bits_hash_table)
ipa_bits_hash_table = hash_table<ipa_bit_ggc_hash_traits>::create_ggc (37);
@@ -3735,7 +3735,8 @@ ipa_free_all_edge_args (void)
if (!ipa_edge_args_sum)
return;
- ipa_edge_args_sum->release ();
+ ipa_edge_args_sum->~ipa_edge_args_sum_t ();
+ ggc_free (ipa_edge_args_sum);
ipa_edge_args_sum = NULL;
}
@@ -3744,7 +3745,8 @@ ipa_free_all_edge_args (void)
void
ipa_free_all_node_params (void)
{
- ipa_node_params_sum->release ();
+ ipa_node_params_sum->~ipa_node_params_t ();
+ ggc_free (ipa_node_params_sum);
ipa_node_params_sum = NULL;
}
@@ -3770,7 +3772,8 @@ ipcp_free_transformation_sum (void)
if (!ipcp_transformation_sum)
return;
- ipcp_transformation_sum->release ();
+ ipcp_transformation_sum->~function_summary<ipcp_transformation *> ();
+ ggc_free (ipcp_transformation_sum);
ipcp_transformation_sum = NULL;
}