aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-06-08 14:26:57 +0200
committerMartin Liska <marxin@gcc.gnu.org>2018-06-08 12:26:57 +0000
commit746447567a82ce2987f579770fd296ace60f87b1 (patch)
treec22de406a2a163de859df4f8b0c31de0e34a74a3 /gcc/cgraph.h
parent9d3e0adc2a0e657b2aa384f1392dd2fac77a62d4 (diff)
downloadgcc-746447567a82ce2987f579770fd296ace60f87b1.zip
gcc-746447567a82ce2987f579770fd296ace60f87b1.tar.gz
gcc-746447567a82ce2987f579770fd296ace60f87b1.tar.bz2
Remove cgraph_node::summary_uid and make cgraph_node::uid really unique.
2018-06-08 Martin Liska <mliska@suse.cz> * cgraph.c (cgraph_node::remove): Do not recycle uid. * cgraph.h (symbol_table::release_symbol): Do not pass uid. (symbol_table::allocate_cgraph_symbol): Do not set uid. * passes.c (uid_hash_t): Record removed_nodes by their uids. (remove_cgraph_node_from_order): Use the removed_nodes set. (do_per_function_toporder): Likwise. * symbol-summary.h (symtab_insertion): Use cgraph_node::uid instead of summary_uid. (symtab_removal): Likewise. (symtab_duplication): Likewise. 2018-06-08 Martin Liska <mliska@suse.cz> * lto-partition.c (lto_balanced_map): Use cgraph_node::uid instead of summary_uid. From-SVN: r261315
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index f0f9961..9a05867 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -1392,8 +1392,6 @@ public:
int count_materialization_scale;
/* Unique id of the node. */
int uid;
- /* Summary unique id of the node. */
- int summary_uid;
/* ID assigned by the profiling. */
unsigned int profile_id;
/* Time profiler: first run of function. */
@@ -2013,7 +2011,7 @@ public:
friend class cgraph_node;
friend class cgraph_edge;
- symbol_table (): cgraph_max_summary_uid (1)
+ symbol_table (): cgraph_max_uid (1)
{
}
@@ -2073,9 +2071,8 @@ public:
/* Allocate new callgraph node and insert it into basic data structures. */
cgraph_node *create_empty (void);
- /* Release a callgraph NODE with UID and put in to the list
- of free nodes. */
- void release_symbol (cgraph_node *node, int uid);
+ /* Release a callgraph NODE. */
+ void release_symbol (cgraph_node *node);
/* Output all variables enqueued to be assembled. */
bool output_variables (void);
@@ -2223,7 +2220,6 @@ public:
int cgraph_count;
int cgraph_max_uid;
- int cgraph_max_summary_uid;
int edges_count;
int edges_max_uid;
@@ -2586,7 +2582,7 @@ symbol_table::unregister (symtab_node *node)
/* Release a callgraph NODE with UID and put in to the list of free nodes. */
inline void
-symbol_table::release_symbol (cgraph_node *node, int uid)
+symbol_table::release_symbol (cgraph_node *node)
{
cgraph_count--;
@@ -2594,7 +2590,6 @@ symbol_table::release_symbol (cgraph_node *node, int uid)
list. */
memset (node, 0, sizeof (*node));
node->type = SYMTAB_FUNCTION;
- node->uid = uid;
SET_NEXT_FREE_NODE (node, free_nodes);
free_nodes = node;
}
@@ -2612,12 +2607,9 @@ symbol_table::allocate_cgraph_symbol (void)
free_nodes = NEXT_FREE_NODE (node);
}
else
- {
- node = ggc_cleared_alloc<cgraph_node> ();
- node->uid = cgraph_max_uid++;
- }
+ node = ggc_cleared_alloc<cgraph_node> ();
- node->summary_uid = cgraph_max_summary_uid++;
+ node->uid = cgraph_max_uid++;
return node;
}