Use non-null knowledge in path_range_query.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 3 Sep 2021 09:22:26 +0000 (11:22 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 3 Sep 2021 13:30:57 +0000 (15:30 +0200)
commit410e8742638dadc8f84db681ca7bd9c031d41446
treeaad68d5fc37166b8a2beb71595296d3023383407
parent134289146468b0b7215159d1940a674e1c3b228e
Use non-null knowledge in path_range_query.

This patch improves ranges for pointers we are interested in a path, by
using the non-null class from the ranger.  This allows us to thread more
paths with minimal effort.

Tested on x86-64 Linux.

gcc/ChangeLog:

* gimple-range-path.cc (path_range_query::range_defined_in_block):
Adjust for non-null.
(path_range_query::adjust_for_non_null_uses): New.
(path_range_query::precompute_ranges): Call
adjust_for_non_null_uses.
* gimple-range-path.h: Add m_non_null and
adjust_for_non_null_uses.
gcc/gimple-range-path.cc
gcc/gimple-range-path.h