diff options
author | Martin Liska <mliska@suse.cz> | 2018-06-08 14:36:26 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-06-08 12:36:26 +0000 |
commit | 4325656f9fddc1c3802ac27795a77cec3ede27a4 (patch) | |
tree | 3007ee87e0be9ad71f6af55941a7f2d815dedcfa /gcc/passes.c | |
parent | 8b25212d3e960dd130d71330ad6d55b40c5be254 (diff) | |
download | gcc-4325656f9fddc1c3802ac27795a77cec3ede27a4.zip gcc-4325656f9fddc1c3802ac27795a77cec3ede27a4.tar.gz gcc-4325656f9fddc1c3802ac27795a77cec3ede27a4.tar.bz2 |
Come up with cgraph_node::get_uid and make cgraph_node::uid private.
2018-06-08 Martin Liska <mliska@suse.cz>
* cgraph.c (function_version_hasher::hash): Use
cgraph_node::get_uid ().
(function_version_hasher::equal):
* cgraph.h (cgraph_node::get_uid): New method.
* ipa-inline.c (update_caller_keys): Use
cgraph_node::get_uid ().
(update_callee_keys): Likewise.
* ipa-utils.c (searchc): Likewise.
(ipa_reduced_postorder): Likewise.
* lto-cgraph.c (input_node): Likewise.
* passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
* symbol-summary.h (symtab_insertion): Likewise.
(symtab_removal): Likewise.
(symtab_duplication): Likewise.
* tree-pretty-print.c (dump_function_header): Likewise.
* tree-sra.c (convert_callers_for_node): Likewise.
From-SVN: r261320
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index 537e95a..6e61402 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1170,7 +1170,7 @@ is_pass_explicitly_enabled_or_disabled (opt_pass *pass, if (!slot) return false; - cgraph_uid = func ? cgraph_node::get (func)->uid : 0; + cgraph_uid = func ? cgraph_node::get (func)->get_uid () : 0; if (func && DECL_ASSEMBLER_NAME_SET_P (func)) aname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (func)); @@ -1635,7 +1635,7 @@ do_per_function (void (*callback) (function *, void *data), void *data) static int nnodes; static GTY ((length ("nnodes"))) cgraph_node **order; -#define uid_hash_t hash_set<int_hash <int, 0, -1>> +#define uid_hash_t hash_set<int_hash <int, 0, -1> > /* Hook called when NODE is removed and therefore should be excluded from order vector. DATA is a hash set with removed nodes. */ @@ -1644,7 +1644,7 @@ static void remove_cgraph_node_from_order (cgraph_node *node, void *data) { uid_hash_t *removed_nodes = (uid_hash_t *)data; - removed_nodes->add (node->uid); + removed_nodes->add (node->get_uid ()); } /* If we are in IPA mode (i.e., current_function_decl is NULL), call @@ -1675,7 +1675,7 @@ do_per_function_toporder (void (*callback) (function *, void *data), void *data) cgraph_node *node = order[i]; /* Function could be inlined and removed as unreachable. */ - if (node == NULL || removed_nodes.contains (node->uid)) + if (node == NULL || removed_nodes.contains (node->get_uid ())) continue; /* Allow possibly removed nodes to be garbage collected. */ |