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

--- Comment #7 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:0a38f677463ff8a4fb61b049263aa596ef6471a7

commit r14-275-g0a38f677463ff8a4fb61b049263aa596ef6471a7
Author: Andrew MacLeod <amacl...@redhat.com>
Date:   Tue Mar 28 11:35:26 2023 -0400

    Create a lazy ssa_cache.

    Sparsely used ssa caches can benefit from using a bitmap to
    determine if a name already has an entry.  Utilize it in the path query
    and remove its private bitmap for tracking the same info.
    Also use it in the "assume" query class.

            PR tree-optimization/108697
            * gimple-range-cache.cc (ssa_global_cache::clear_range): Do
            not clear the vector on an out of range query.
            (ssa_cache::dump): Use dump_range_query instead of get_range.
            (ssa_cache::dump_range_query): New.
            (ssa_lazy_cache::dump_range_query): New.
            (ssa_lazy_cache::set_range): New.
            * gimple-range-cache.h (ssa_cache::dump_range_query): New.
            (class ssa_lazy_cache): New.
            (ssa_lazy_cache::ssa_lazy_cache): New.
            (ssa_lazy_cache::~ssa_lazy_cache): New.
            (ssa_lazy_cache::get_range): New.
            (ssa_lazy_cache::clear_range): New.
            (ssa_lazy_cache::clear): New.
            (ssa_lazy_cache::dump): New.
            * gimple-range-path.cc (path_range_query::path_range_query): Do
            not allocate a ssa_cache object nor has_cache bitmap.
            (path_range_query::~path_range_query): Do not free objects.
            (path_range_query::clear_cache): Remove.
            (path_range_query::get_cache): Adjust.
            (path_range_query::set_cache): Remove.
            (path_range_query::dump): Don't call through a pointer.
            (path_range_query::internal_range_of_expr): Set cache directly.
            (path_range_query::reset_path): Clear cache directly.
            (path_range_query::ssa_range_in_phi): Fold with globals only.
            (path_range_query::compute_ranges_in_phis): Simply set range.
            (path_range_query::compute_ranges_in_block): Call cache directly.
            * gimple-range-path.h (class path_range_query): Replace bitmap
            and cache pointer with lazy cache object.
            * gimple-range.h (class assume_query): Use ssa_lazy_cache.

Reply via email to