aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-streamer.c')
-rw-r--r--gcc/tree-streamer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-streamer.c b/gcc/tree-streamer.c
index f6181fa..b0afa1d 100644
--- a/gcc/tree-streamer.c
+++ b/gcc/tree-streamer.c
@@ -299,10 +299,11 @@ record_common_node (struct streamer_tree_cache_d *cache, tree node)
if (!node)
node = error_mark_node;
- /* ??? FIXME, devise a better hash value. But the hash needs to be equal
- for all frontend and lto1 invocations. So just use the position
- in the cache as hash value. */
- streamer_tree_cache_append (cache, node, cache->nodes.length ());
+ /* This hash needs to be equal for all frontend and lto1 invocations. So
+ just use the position in the cache as hash value.
+ Small integers are used by hash_tree to record positions within scc
+ hash. Values are not in same range. */
+ streamer_tree_cache_append (cache, node, cache->next_idx + 0xc001);
switch (TREE_CODE (node))
{