Add equivalence iterator to relation oracle.
authorAndrew MacLeod <amacleod@redhat.com>
Fri, 7 Oct 2022 16:55:32 +0000 (12:55 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 13 Oct 2022 15:28:47 +0000 (11:28 -0400)
commitaa05838b0536422256e0c477c57f1ea1d2915e92
tree01f8fed672546f602e1e5db683ef1d1e00b7febe
parentb5563410ea613ff2b2d7c6fa1847cfcb1ff91efb
Add equivalence iterator to relation oracle.

Instead of looping over an exposed equivalence bitmap, provide iterators
to loop over equivalences, partial equivalences, or both.

* gimple-range-cache.cc (ranger_cache::fill_block_cache): Use
iterator.
* value-relation.cc
  (equiv_relation_iterator::equiv_relation_iterator): New.
(equiv_relation_iterator::next): New.
(equiv_relation_iterator::get_name): New.
* value-relation.h (class relation_oracle): Privatize some methods.
(class equiv_relation_iterator): New.
(FOR_EACH_EQUIVALENCE): New.
(FOR_EACH_PARTIAL_EQUIV): New.
(FOR_EACH_PARTIAL_AND_FULL_EQUIV): New.
gcc/gimple-range-cache.cc
gcc/value-relation.cc
gcc/value-relation.h