When searching for non-null, check the dominator tree.
authorAndrew MacLeod <amacleod@redhat.com>
Tue, 27 Apr 2021 12:44:46 +0000 (08:44 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 7 May 2021 19:00:21 +0000 (15:00 -0400)
commita7943ea96d6a076a06eb06bd71a2656e682b8a78
treed40cb117c49ad3a3623d3c89ea96ea4461145ccd
parentd942d7332d3dbd93609f5b5706df5990fd63dcfc
When searching for non-null, check the dominator tree.

The non-null bitmap only indicates which blocks non-null setting occurs.
Generalized queries need to search the dom tree, whereas propagation
engines only need to know the current block.  Add a flag for this purpose.

* gimple-range-cache.cc (non_null_ref::non_null_deref_p): Search
dominator tree is available and requested.
(ranger_cache::ssa_range_in_bb): Don't search dom tree here.
(ranger_cache::fill_block_cache): Don't search dom tree here either.
* gimple-range-cache.h (non_null_deref_p): Add dom_search param.
gcc/gimple-range-cache.cc
gcc/gimple-range-cache.h