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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Macleod <amacl...@gcc.gnu.org>:

https://gcc.gnu.org/g:6493b7af37e473a89c67afab474330f931dd8447

commit r13-5807-g6493b7af37e473a89c67afab474330f931dd8447
Author: Andrew MacLeod <amacl...@redhat.com>
Date:   Thu Feb 9 17:50:07 2023 -0500

    Query rangers cache in readonly mode only from within

    The change for 108356 allowed the cache to scan the dominator trees when
    it was attempting a lookup rather than using the local value.  I
    inadvertantly changed the externbal interface to also do this, so all
    the GORI queries via range_on_edge of the cache could also do lookups.

    This triggered a quadratic, possible expoential time increase when
    the right conditions were presented. That being a cascading series of
    recomputaions on outgoing edge calucaltions that at then searched the dom
tree
    instead of being a simple calcualtion using whats easily available.

    The fix is to use the internal API within the cache rather than the
    extrenal one that GORI uses.   This leaves GORI computations to be
    resovled in linear time.

            PR tree-optimization/108687
            gcc/
            * gimple-range-cache.cc (ranger_cache::range_on_edge): Revert
            back to RFD_NONE mode for calculations.
            (ranger_cache::propagate_cache): Call the internal edge range API
            with RFD_READ_ONLY instead of changing the external routine.

Reply via email to