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

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amonakov at gcc dot gnu.org

--- Comment #61 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #60)
> > This one is btw. a known issue PR108129.
> 
> But the revision only sligthly changes the patterns so I'm very curious
> how it arrived at 30% slowdown.

It adds an extra 'convert2?' to 'nop_atomic_bit_test_and_p' matchers, and since
match.pd expansion works by emitting match subtrees twice for each '?'
component, that gives an extra 2x factor to the already bad combinatorial
explosion going on in those patterns.

We really need to rework match-and-simplify emission in a smarter way. I've
looked at that in January once, but there's a few things I'd need help
understanding, such as...

> The "trivial" improvement of course would be to special-case
> iterator uses als for (match ...) like we do for (simplify ...) where
> we can delay substitution.

... this. Is there a short explanation what's 'delayed substitution' in this
context?

Reply via email to