This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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?
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:
signature.asc
Description: OpenPGP digital signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |