Make range_from_dom more effective.
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 24 Mar 2022 19:28:43 +0000 (15:28 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 13 May 2022 13:45:35 +0000 (09:45 -0400)
commit6b156044c12bc4582511fe270b10450c943476dd
tree7e588128b0f0f94d8386f248f8dac1812490257c
parentb584cbdb0829bb0ad4e6ed7488a304ae4e76b870
Make range_from_dom more effective.

Add modes to range_from_dom such that we can simply query, or adjust the
cache and deal with multiple predecessor blocks.

* gimple-range-cache.cc (ranger_cache::ranger_cache): Start with
worlist truncated.
(ranger_cache::entry_range): Add rfd_mode parameter.
(ranger_cache::exit_range): Ditto.
(ranger_cache::edge_range): New.  Incorporate from range_on_edge.
(ranger_cache::range_of_expr): Adjust call to entry_range.
(ranger_cache::range_on_edge): Split to edge_range and call.
(ranger_cache::fill_block_cache): Always invoke range_from_dom.
(ranger_cache::range_from_dom): Make reentrant, add search mode, handle
mutiple predecessors.
(ranger_cache::update_to_nonnull): Adjust call to exit_range.
* gimple-range-cache.h (ranger_cache): Add enum rfd_mode.  Adjust
prototypes.
gcc/gimple-range-cache.cc
gcc/gimple-range-cache.h