This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/5] remove param$N_is usage


On 11/12/14 22:55, tsaunders@mozilla.com wrote:
From: Trevor Saunders <tsaunders@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]