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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> We can experiment with adding unshare_exprs to genmatch and see in how many
> patterns that triggers.  But as said, the general issue looks latent to me.
> Folding during gimplification is dangerous.

It isn't just folding during gimplification, we have hundreds of fold_build*
calls in tons of GIMPLE passes too, and at that point unsharing is also needed.
I'll try to implement the unsharing and we can see how many patterns it affects
and based on that decide if we want some cfun flag to control the unsharing or
not, ok?

Reply via email to