re PR jit/91928 (libgccjit fails on subsequent compilations in ipa-cp)
authorAndrea Corallo <andrea.corallo@arm.com>
Thu, 3 Oct 2019 12:39:55 +0000 (12:39 +0000)
committerAndrea Corallo <akrl@gcc.gnu.org>
Thu, 3 Oct 2019 12:39:55 +0000 (12:39 +0000)
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.

From-SVN: r276507

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

index 991949b3c1badb6dc5d57fc91bfad5b2da4ba479..bd550afd37efe33bb9e41a136de25013288096ee 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-03  Andrea Corallo  <andrea.corallo@arm.com>
+
+       * 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  <aldyh@redhat.com>
 
        * Makefile.in (OBJS): Add range.o and range-op.o.
index 67664ec8c0747bc634e5930bf15fc045247f8e67..045072e02ec20eb76b1aa435a9c141be55469c9c 100644 (file)
@@ -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 ();
 }
index 25a108d5824ec40147ecfa32f50c6ccfb4f9a239..e79add12b1e5ffbc30a2caa0ba53bac7b041d3bd 100644 (file)
@@ -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
index 30948fb8854001c969a4ed12da32eda593f50c86..0ff80854284520004a7eec5331c5466c0ea32679 100644 (file)
@@ -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.  */