]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport fix for PR jit/91928
authorAndrea Corallo <andrea.corallo@arm.com>
Sat, 5 Oct 2019 09:02:25 +0000 (09:02 +0000)
committerAndrea Corallo <akrl@gcc.gnu.org>
Sat, 5 Oct 2019 09:02:25 +0000 (09:02 +0000)
gcc/ChangeLog

2019-10-05  Andrea Corallo  <andrea.corallo@arm.com>

Backport from mainline
2019-10-03  Andrea Corallo  <andrea.corallo@arm.com>
* gcc/ipa-cp.c (ipa_cp_c_finalize): Release ipcp_transformation_sum
when finished.
* ipa-prop.c (ipcp_free_transformation_sum): New function.
* ipa-prop.h (ipcp_free_transformation_sum): Add declaration.

From-SVN: r276625

gcc/ChangeLog
gcc/ipa-cp.c
gcc/ipa-prop.c
gcc/ipa-prop.h

index 39e50092f84ae7e4b3eda49aba18edef2b5713c5..56a11ea465a2be9d441a0406dbefce90f50d8e22 100644 (file)
@@ -1,3 +1,12 @@
+2019-10-05  Andrea Corallo  <andrea.corallo@arm.com>
+
+       Backport from mainline
+       2019-10-03  Andrea Corallo  <andrea.corallo@arm.com>
+       * gcc/ipa-cp.c (ipa_cp_c_finalize): Release ipcp_transformation_sum
+       when finished.
+       * ipa-prop.c (ipcp_free_transformation_sum): New function.
+       * ipa-prop.h (ipcp_free_transformation_sum): Add declaration.
+
 2019-10-04  Dragan Mladjenovic <dmladjenovic@wavecomp.com>
 
        Backport from mainline
index 32b352328a91d52b1f8aea9656166f243ffd78bb..d414632e602639a73f3e99678e7dae550df724be 100644 (file)
@@ -5190,4 +5190,5 @@ ipa_cp_c_finalize (void)
   max_count = profile_count::uninitialized ();
   overall_size = 0;
   max_new_size = 0;
+  ipcp_free_transformation_sum ();
 }
index d86c2f3db5528f5fe3c67e46cecd2f3bb761a212..848180aa441c88b23f947bf80b2348261b9e7140 100644 (file)
@@ -3725,6 +3725,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
index 7257a6d04f141ddd25b75947231ecc1666cad5c8..5ab3d07a6dea9b31db7ea774620d83e74639025e 100644 (file)
@@ -558,6 +558,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.  */