From f5e2500f30ad337e85e0b53eaa15c724657966a2 Mon Sep 17 00:00:00 2001 From: Michael Ploujnikov Date: Mon, 3 Dec 2018 18:19:18 -0500 Subject: [PATCH] PR ipa/88297 gcc/ChangeLog: 2018-12-03 Michael Ploujnikov 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 *clone_num_suffixes; +/* Node name to unique clone suffix number map. */ +static hash_map *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; + clone_num_suffixes = new hash_map; if (dump_file) { -- 2.19.1