public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Revert one ipa_call_summaries::get to get_create (PR ipa/86323).
@ 2018-06-29 13:41 Martin Liška
  2018-06-29 15:09 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2018-06-29 13:41 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jan Hubicka

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

Hi.

It's revert of a hunk that causes a new ICE.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

Ready to be installed?
Martin

gcc/ChangeLog:

2018-06-29  Martin Liska  <mliska@suse.cz>

        PR ipa/86323
	* ipa-inline.c (early_inliner): Revert wrongly added ::get call.

gcc/testsuite/ChangeLog:

2018-06-29  Martin Liska  <mliska@suse.cz>

        PR ipa/86323
	* g++.dg/ipa/pr86323.C: New test.
---
 gcc/ipa-inline.c                   | 13 +++++--------
 gcc/testsuite/g++.dg/ipa/pr86323.C | 28 ++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 8 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/ipa/pr86323.C



[-- Attachment #2: 0001-Revert-one-ipa_call_summaries-get-to-get_create-PR-i.patch --]
[-- Type: text/x-patch, Size: 1587 bytes --]

diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index a62c1ffd3b0..a84d1d9ad3e 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -2802,14 +2802,11 @@ early_inliner (function *fun)
 	  for (edge = node->callees; edge; edge = edge->next_callee)
 	    {
 	      /* We have no summary for new bound store calls yet.  */
-	      ipa_call_summary *es = ipa_call_summaries->get (edge);
-	      if (es != NULL)
-		{
-		  es->call_stmt_size
-		    = estimate_num_insns (edge->call_stmt, &eni_size_weights);
-		  es->call_stmt_time
-		    = estimate_num_insns (edge->call_stmt, &eni_time_weights);
-		}
+	      ipa_call_summary *es = ipa_call_summaries->get_create (edge);
+	      es->call_stmt_size
+		= estimate_num_insns (edge->call_stmt, &eni_size_weights);
+	      es->call_stmt_time
+		= estimate_num_insns (edge->call_stmt, &eni_time_weights);
 
 	      if (edge->callee->decl
 		  && !gimple_check_call_matching_types (
diff --git a/gcc/testsuite/g++.dg/ipa/pr86323.C b/gcc/testsuite/g++.dg/ipa/pr86323.C
new file mode 100644
index 00000000000..6632f35d86c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr86323.C
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 --param max-early-inliner-iterations=5" } */
+
+char *s;
+namespace a {
+template <class ae> class af {
+public:
+  af(ae);
+};
+typedef af<char *> b;
+namespace ag {
+class ah {
+public:
+  void ai(b aj) { c(aj); }
+  virtual void c(b);
+};
+class d : public ah {
+  void c(b);
+};
+class e {
+  void f(bool);
+  void ai(b aj) { g.ai(aj); }
+  d g;
+};
+void d::c(b) {}
+void e::f(bool) { ai(s); }
+}
+}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Revert one ipa_call_summaries::get to get_create (PR ipa/86323).
  2018-06-29 13:41 [PATCH] Revert one ipa_call_summaries::get to get_create (PR ipa/86323) Martin Liška
@ 2018-06-29 15:09 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2018-06-29 15:09 UTC (permalink / raw)
  To: Martin Liška, gcc-patches; +Cc: Jan Hubicka

On 06/29/2018 07:41 AM, Martin Liška wrote:
> Hi.
> 
> It's revert of a hunk that causes a new ICE.
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
> 
> Ready to be installed?
> Martin
> 
> gcc/ChangeLog:
> 
> 2018-06-29  Martin Liska  <mliska@suse.cz>
> 
>         PR ipa/86323
> 	* ipa-inline.c (early_inliner): Revert wrongly added ::get call.
> 
> gcc/testsuite/ChangeLog:
> 
> 2018-06-29  Martin Liska  <mliska@suse.cz>
> 
>         PR ipa/86323
> 	* g++.dg/ipa/pr86323.C: New test.
OK.
jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-29 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-29 13:41 [PATCH] Revert one ipa_call_summaries::get to get_create (PR ipa/86323) Martin Liška
2018-06-29 15:09 ` Jeff Law

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).