On 11/12/14 22:55, tsaund...@mozilla.com wrote:
From: Trevor Saunders <tsaund...@mozilla.com>
Hi,
The only user of this is splay_tree. We only have a couple splay trees in ggc
memory, and it wasn't clear to me any of them were tree based instead of hash
based for performance reasons, so I chose to just convert them to hash_map
rather than writing a templated splay tree.
bootstrapped + regtested x86_64-unknown-linux-gnu, ok?
trev
gcc/
* hash-map.h (hash_map::iterator): New class.
(hash_map::begin): New method.
(hash_map::end): Likewise.
* alias.c, config/alpha/alpha.c, dwarf2asm.c, omp-low.c, tree.h:
replace splay_tree with hash_map.
Splay trees in the alias code are very very old. They came in with the
initial "restrict" support from Mark Mitchell many many years ago. I
don't recall the reasoning behind using splay trees instead of hash
tables or some other data structure.
In cases where you're removing the last remnants of a splay tree in a
file, please make sure to remove the splay-tree include.
OK with the splay-tree include removal, but if we start to get reports
that these data structures have become a bottleneck, we'll be looking to
you to address that problem ;-)
jeff