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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2026-09-16
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think we should instead see to optimize the roll-back which is done solely
for the purpose of costing.  In the past it was OK to analyze multiple times,
but that's redundant work, so avoiding that would be nice.

ISTR sending a prototype patch that instead of recording costs to a global
cost_vec recorded it to a SLP node private vector.  Then only finally
reachable SLP nodes could be looked at for extracting the costs.

The other possibility would be to also unwind the analysis fully, that is,
reset both SLP_TREE_TYPE and the data.  But as said, avoiding the redundant
analysis (iff another SLP graph entry reaches the node) would be best.

The problem should mostly manifest with BB vectorization given otherwise
a failure to analyze an SLP instance will be fatal.

I can look at resurrecting the patch, but it will have to wait a bit unless
we run into this issue actively right now.

Reply via email to