public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrea Corallo <Andrea.Corallo@arm.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	"jit@gcc.gnu.org"	<jit@gcc.gnu.org>
Cc: nd <nd@arm.com>
Subject: [PATCH] IPA-CP release transformation summary (PR jit/91928)
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <gkrlfu6uphd.fsf@arm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

Hi all,
I'd like to submit this patch.
It release the ipa cp transformation summary after functions being expanded.
This is to fix the compiler when used with libgccjit on subsequent
compilations (every new compilation should have a clean transformation
summary).

Bootstrap on arm64 and X86-64.

Bests
  Andrea

gcc/ChangeLog
2019-??-??  Andrea Corallo  <andrea.corallo@arm.com>

	* cgraphunit.c (expand_all_functions): Release ipcp_transformation_sum
	when finished.
	* ipa-prop.c (ipcp_free_transformation_sum): New function.
	* ipa-prop.h (ipcp_free_transformation_sum): Add declaration.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 91928.patch --]
[-- Type: text/x-diff; name="91928.patch", Size: 1477 bytes --]

diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index cb08efe..0251fa4 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2342,6 +2342,7 @@ expand_all_functions (void)
              profiled_func_count, expanded_func_count);
 
   symtab->process_new_functions ();
+  ipcp_free_transformation_sum ();
   free_gimplify_stack ();
 
   free (order);
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h
index 30948fb..0ff8085 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.  */
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 2f2b070..158dbe7 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

             reply	other threads:[~2019-09-30  9:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  0:00 Andrea Corallo [this message]
2019-01-01  0:00 ` Martin Jambor
2019-01-01  0:00   ` Andrea Corallo
2019-01-01  0:00     ` Jeff Law
2019-01-01  0:00       ` Andrea Corallo
2019-01-01  0:00         ` Jeff Law
2019-01-01  0:00           ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gkrlfu6uphd.fsf@arm.com \
    --to=andrea.corallo@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jit@gcc.gnu.org \
    --cc=nd@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).