diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2022-08-30 15:43:47 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2022-08-30 15:43:47 +0100 |
commit | 8c6952abc8ceff1a25b78506315959240cb73d41 (patch) | |
tree | 23c566e5b3ec7993a6fcc691a9ad2e2fcede37e7 /gcc/tree-vectorizer.h | |
parent | 2bac880a19633b96608548b412739379df1c10dc (diff) | |
download | gcc-8c6952abc8ceff1a25b78506315959240cb73d41.zip gcc-8c6952abc8ceff1a25b78506315959240cb73d41.tar.gz gcc-8c6952abc8ceff1a25b78506315959240cb73d41.tar.bz2 |
Rearrange unbounded_hashmap_traits
int_hash combines two kinds of operation:
(1) hashing and equality of integers
(2) using spare integer encodings to represent empty and deleted slots
(1) is really independent of (2), and could be useful in cases where
no spare integer encodings are available. This patch adds a base class
(int_hash_base) for (1) and makes int_hash inherit from it.
If we follow a similar style for future hashes, we can make
unbounded_hashmap_traits take the "base" hash for the key
as a template parameter, rather than requiring every type of
key to have a separate derivative of unbounded_hashmap_traits.
A later patch applies this to vector keys.
No functional change intended.
gcc/
* hash-traits.h (int_hash_base): New struct, split out from...
(int_hash): ...this class, which now inherits from int_hash_base.
* hash-map-traits.h (unbounded_hashmap_traits): Take a template
parameter for the key that provides hash and equality functions.
(unbounded_int_hashmap_traits): Turn into a type alias of
unbounded_hashmap_traits.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions