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

--- 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:c6bb1db76b3ac127aff7dacf391fc1798a94bb7d

commit r12-7128-gc6bb1db76b3ac127aff7dacf391fc1798a94bb7d
Author: Andrew MacLeod <amacl...@redhat.com>
Date:   Mon Feb 7 15:52:16 2022 -0500

    Register non-null side effects properly.

    This patch adjusts uses of nonnull to accurately reflect "somewhere in
block".
    It also adds the ability to register statement side effects within a block
    for ranger which will apply for the rest of the block.

            PR tree-optimization/104288
            gcc/
            * gimple-range-cache.cc (non_null_ref::set_nonnull): New.
            (non_null_ref::adjust_range): Move to header.
            (ranger_cache::range_of_def): Don't check non-null.
            (ranger_cache::entry_range): Don't check non-null.
            (ranger_cache::range_on_edge): Check for nonnull on normal edges.
            (ranger_cache::update_to_nonnull): New.
            (non_null_loadstore): New.
            (ranger_cache::block_apply_nonnull): New.
            * gimple-range-cache.h (class non_null_ref): Update prototypes.
            (non_null_ref::adjust_range): Move to here and inline.
            (class ranger_cache): Update prototypes.
            * gimple-range-path.cc (path_range_query::range_defined_in_block):
Do
            not search dominators.
            (path_range_query::adjust_for_non_null_uses): Ditto.
            * gimple-range.cc (gimple_ranger::range_of_expr): Check on-entry
for
            def overrides.  Do not check nonnull.
            (gimple_ranger::range_on_entry): Check dominators for nonnull.
            (gimple_ranger::range_on_edge): Check for nonnull on normal edges..
            (gimple_ranger::register_side_effects): New.
            * gimple-range.h (gimple_ranger::register_side_effects): New.
            * tree-vrp.cc (rvrp_folder::fold_stmt): Call register_side_effects.

            gcc/testsuite/
            * gcc.dg/pr104288.c: New.

Reply via email to