mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-29 11:11:06 +00:00
d42f65e7c1
The unordered_set in ADCE that holds all of the live instructions takes a very long time to be destroyed. In some shaders, it takes over 40% of the time. If we look at the unique ids of the live instructions, I believe they are dense enough make a simple bit vector a good choice for to hold that data. When I check the density of the bit vector for larger shaders, we are usually using less than 4 bytes per element in the vector, and almost always less than 16. So, in this commit, I introduce a simple bit vector class, and use it in ADCE. This help improve the compile time for some shaders on windows by the 40% mentioned above. Contributes to https://github.com/KhronosGroup/SPIRV-Tools/issues/1328. |
||
---|---|---|
.. | ||
bit_stream.cpp | ||
bit_stream.h | ||
bit_vector.cpp | ||
bit_vector.h | ||
bitutils.h | ||
hex_float.h | ||
huffman_codec.h | ||
ilist_node.h | ||
ilist.h | ||
move_to_front.h | ||
parse_number.cpp | ||
parse_number.h | ||
string_utils.cpp | ||
string_utils.h | ||
timer.cpp | ||
timer.h |