public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Ploujnikov <michael.ploujnikov@oracle.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Richard Guenther <richard.guenther@gmail.com>,
	       Martin Jambor <mjambor@suse.cz>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	       Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH v3] Make function clone name numbering independent.
Date: Tue, 04 Dec 2018 03:06:00 -0000	[thread overview]
Message-ID: <faca2e7e-0266-a9b3-9d84-95988bc31229@oracle.com> (raw)
In-Reply-To: <af5b054d-68d7-6aec-65b3-9cac4771f7b4@oracle.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 841 bytes --]

On 2018-12-03 12:00 p.m., Michael Ploujnikov wrote:
> On 2018-12-01 11:29 a.m., H.J. Lu wrote:
>> This caused:
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88297
>>
> 
> Sorry about that. Looks like I should have been testing with
> --with-build-config=bootstrap-lto rather than just --enable-bootstrap.
> 
> The quick fix would be to undo the patch to create_virtual_clone or to
> just change clone_num_suffixes to key off of DECL_ASSEMBLER_NAME
> (node->decl) instead of node pointers. Any preferences?
> 
> The harder fix would be to figure out why some nodes share the same
> names and fix that, but maybe that's just inevitable with LTO?
> 
> - Michael
> 

Here's a quick fix while the issue is being investigated.

Bootstrapped (--with-build-config=bootstrap-lto) and regtested on x86_64.

Ok for trunk?

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-PR-ipa-88297.patch --]
[-- Type: text/x-patch; name="0001-PR-ipa-88297.patch", Size: 1849 bytes --]

From f5e2500f30ad337e85e0b53eaa15c724657966a2 Mon Sep 17 00:00:00 2001
From: Michael Ploujnikov <michael.ploujnikov@oracle.com>
Date: Mon, 3 Dec 2018 18:19:18 -0500
Subject: [PATCH] PR ipa/88297

gcc/ChangeLog:

2018-12-03  Michael Ploujnikov  <michael.ploujnikov@oracle.com>

	PR ipa/88297
	* ipa-cp.c (create_specialized_node): Store clone counters by
	node assembler names.
	(ipcp_driver): Change type of clone_num_suffixes key type to
	const char*.
---
 gcc/ipa-cp.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git gcc/ipa-cp.c gcc/ipa-cp.c
index e0cd1bc45b..f82473e37c 100644
--- gcc/ipa-cp.c
+++ gcc/ipa-cp.c
@@ -376,8 +376,8 @@ static profile_count max_count;
 
 static long overall_size, max_new_size;
 
-/* Node to unique clone suffix number map.  */
-static hash_map<cgraph_node *, unsigned> *clone_num_suffixes;
+/* Node name to unique clone suffix number map.  */
+static hash_map<const char *, unsigned> *clone_num_suffixes;
 
 /* Return the param lattices structure corresponding to the Ith formal
    parameter of the function described by INFO.  */
@@ -3831,7 +3831,9 @@ create_specialized_node (struct cgraph_node *node,
 	}
     }
 
-  unsigned &suffix_counter = clone_num_suffixes->get_or_insert (node);
+  unsigned &suffix_counter = clone_num_suffixes->get_or_insert (
+			       IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (
+				 node->decl)));
   new_node = node->create_virtual_clone (callers, replace_trees,
 					 args_to_skip, "constprop",
 					 suffix_counter);
@@ -5049,7 +5051,7 @@ ipcp_driver (void)
 
   ipa_check_create_node_params ();
   ipa_check_create_edge_args ();
-  clone_num_suffixes = new hash_map<cgraph_node *, unsigned>;
+  clone_num_suffixes = new hash_map<const char *, unsigned>;
 
   if (dump_file)
     {
-- 
2.19.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-12-04  3:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 19:38 [PATCH] " Michael Ploujnikov
2018-07-17  6:10 ` Bernhard Reutner-Fischer
2018-07-17 10:03   ` Richard Biener
2018-07-17 20:25     ` Michael Ploujnikov
2018-07-20  2:49       ` Michael Ploujnikov
2018-07-20 10:05         ` Richard Biener
2018-07-24 13:57           ` Michael Ploujnikov
2018-07-26 17:27             ` Michael Ploujnikov
2018-07-31 17:40               ` Michael Ploujnikov
2018-08-01 10:38                 ` Richard Biener
2018-08-02 19:05                   ` Michael Ploujnikov
2018-08-13 23:58                     ` [PING][PATCH] " Michael Ploujnikov
2018-08-20 19:47                       ` Jeff Law
2018-08-31 18:49                       ` [PING v2][PATCH] " Michael Ploujnikov
2018-09-03 10:02                         ` Martin Jambor
2018-09-03 11:08                           ` Richard Biener
2018-09-03 13:15                             ` Martin Jambor
2018-09-05  3:24                               ` Michael Ploujnikov
2018-11-28 21:09                                 ` [PATCH v3] " Michael Ploujnikov
2018-11-28 22:49                                   ` Segher Boessenkool
2018-11-29 14:13                                     ` Michael Ploujnikov
2018-11-30  7:26                                   ` Richard Biener
2018-11-30 21:11                                     ` Michael Ploujnikov
2018-12-01 16:31                                       ` H.J. Lu
2018-12-03 17:00                                         ` Michael Ploujnikov
2018-12-04  3:06                                           ` Michael Ploujnikov [this message]
2018-12-04 14:07                                             ` Jan Hubicka
2018-09-05  3:32                           ` [PING v2][PATCH] " Michael Ploujnikov
2018-12-04 12:48                             ` Martin Jambor
2018-12-04 13:22                               ` Michael Ploujnikov

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=faca2e7e-0266-a9b3-9d84-95988bc31229@oracle.com \
    --to=michael.ploujnikov@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=hubicka@ucw.cz \
    --cc=mjambor@suse.cz \
    --cc=richard.guenther@gmail.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).