From: akrl Date: Thu, 3 Oct 2019 12:39:55 +0000 (+0000) Subject: PR jit/91928 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63a883d16adfee388c7a512322d21ac6fc673e26;p=thirdparty%2Fgcc.git PR jit/91928 * ipa-cp.c (ipa_cp_c_finalize): Release ipcp_transformation_sum. * ipa-prop.c (ipcp_free_transformation_sum): New function. * ipa-prop.h (ipcp_free_transformation_sum): Add declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276507 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 991949b3c1ba..bd550afd37ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-03 Andrea Corallo + + * ipa-cp.c (ipa_cp_c_finalize): Release ipcp_transformation_sum. + * ipa-prop.c (ipcp_free_transformation_sum): New function. + * ipa-prop.h (ipcp_free_transformation_sum): Add declaration. + 2019-10-03 Aldy Hernandez * Makefile.in (OBJS): Add range.o and range-op.o. diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 67664ec8c074..045072e02ec2 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -5304,4 +5304,5 @@ ipa_cp_c_finalize (void) max_count = profile_count::uninitialized (); overall_size = 0; max_new_size = 0; + ipcp_free_transformation_sum (); } diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 25a108d5824e..e79add12b1e5 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -3758,6 +3758,18 @@ ipcp_transformation_initialize (void) ipcp_transformation_sum = ipcp_transformation_t::create_ggc (symtab); } +/* Release the IPA CP transformation summary. */ + +void +ipcp_free_transformation_sum (void) +{ + if (!ipcp_transformation_sum) + return; + + ipcp_transformation_sum->release (); + ipcp_transformation_sum = NULL; +} + /* Set the aggregate replacements of NODE to be AGGVALS. */ void diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index 30948fb88540..0ff808542845 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -561,6 +561,7 @@ struct GTY(()) ipcp_transformation void ipa_set_node_agg_value_chain (struct cgraph_node *node, struct ipa_agg_replacement_value *aggvals); void ipcp_transformation_initialize (void); +void ipcp_free_transformation_sum (void); /* ipa_edge_args stores information related to a callsite and particularly its arguments. It can be accessed by the IPA_EDGE_REF macro. */