https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87256

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For the above case, there are during the recursion 77608 synth_mult calls,
which might be ok, so indeed better hashing would help, but 10311 is too large
and is not a prime number.  Plus this hash table is resolving all collisions by
evicting older cash entries.
That is perhaps fine for the toplevel synth_mult calls, but for the recursive
ones I guess we want to make sure we cache all the values needed to compute the
same toplevel call and perhaps only record the toplevel call's entry if it
would need to evict older entries.
So maybe use the current hash table + another temporary hash_map live just
during the outermost synth_mult call (and activate this behavior only if say
seeing a recursion count of 16)?

Reply via email to