util/ra: Improve ra_set_finalize() performance.
authorEric Anholt <eric@anholt.net>
Mon, 13 Apr 2020 18:14:23 +0000 (11:14 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 19:46:08 +0000 (19:46 +0000)
commit05e6f763e7683c13a59e14f12ce3231d892921c2
tree1db0cce2a5f585d564d35cfb178b638b5d861073
parent53ac2dabec45cc329eb033679db6fdd5a8221851
util/ra: Improve ra_set_finalize() performance.

BITSET_FOR_EACH_SET can walk a sparse set (such as a register class's set
of registers) much faster than just iterating over individual bits.

Improves freedreno startup time (as measured by shader-db ./run
shaders/closed/gputest/triangle on my x86 system) by -4.12679% +/-
1.99006% (n=151)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4537>
src/util/register_allocate.c