summaryrefslogtreecommitdiff
path: root/maintainer-scripts
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-05-22 12:31:34 +0200
committerJan Hubicka <jh@suse.cz>2020-08-13 17:49:07 +0200
commitd575fa7a3abf3b25afb93a39e9a297f6045dc7aa (patch)
tree20290c300e151a7bd5ca60ef27e61e03268d94fc /maintainer-scripts
parentff05169a0d8bd8d7c6d4ae7eb97d188b45ad4881 (diff)
downloadgcc-d575fa7a3abf3b25afb93a39e9a297f6045dc7aa.tar.gz
Fix hashing of prestreamed nodes
this patch seems to solve basically all collisions while building cc1. From: [WPA] read 3312246 unshared trees [WPA] read 1144381 mergeable SCCs of average size 4.833785 [WPA] 8843938 tree bodies read in total [WPA] tree SCC table: size 524287, 197767 elements, collision ratio: 0.506446 [WPA] tree SCC max chain length 43 (size 1) [WPA] Compared 946614 SCCs, 775077 collisions (0.818789) to [WPA] read 3314520 unshared trees [WPA] read 1144763 mergeable SCCs of average size 4.835021 [WPA] 8849473 tree bodies read in total [WPA] tree SCC table: size 524287, 200574 elements, collision ratio: 0.486418 [WPA] tree SCC max chain length 2 (size 1) [WPA] Compared 944189 SCCs, 179 collisions (0.000190) The problem is that preloaded nodes all have hash code 0 because cache->nodes.length is not updated while streaming out. I also added an arbitrary constant to avoid clash with constant of 0 used to hash NULL pointers and 1 used to hash pointers inside SCC. * tree-streamer.c (record_common_node): Fix hash value of pre-streamed nodes. (cherry picked from commit 1089a367c4b05b5e3f072adca8913904ed65928c) (cherry picked from commit 5c7ed52a039cfafb63c27fa8c1535e02dfc1ae09)
Diffstat (limited to 'maintainer-scripts')
0 files changed, 0 insertions, 0 deletions