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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
> 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)?

Sounds reasonable - I'd try activating the behavior on the first collision?

Reply via email to