aco: improve hashing for value numbering
authorDaniel Schürmann <daniel@schuermann.dev>
Tue, 10 Mar 2020 09:00:32 +0000 (10:00 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 9 Apr 2020 15:08:57 +0000 (15:08 +0000)
commitfb5a7902f20ad1285fa875c93bc719a1499d1cb4
treee21eab924f2b8adf0e512592d07bf1a450d7e924
parentc99107ece02b64916031883889b9e010c99e2435
aco: improve hashing for value numbering

An improved hashing greatly reduces the number of collisions,
and thus, increases the speed for lookups in the hash table.
The hash function now uses Murmur3 written by Austin Appleby.

This patch also pre-reserves space for the hashmap to avoid rehashing.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4130>
src/amd/compiler/aco_opt_value_numbering.cpp