On Wed, Dec 11, 2019 at 10:44:58AM -0500, David Malcolm wrote: > Is it OK for a hash_map key to have a "empty" value that isn't > all-zeroes (and thus the same for a hash_table entry)? > > Is the following patch OK for trunk?
I'd say that it is important to analyze the generated code for the common case where empty elt is all zeros (and perhaps POD only). Perhaps -ftree-loop-distribute-patterns can handle it in most cases? Perhaps only when built in C++14 or later mode, that would still affect bootstrapped compilers. Like, could we conditionally constexpr evaluate what mark_empty does and determine at compile time if it is all zeros or not or something similar? Jakub