In PR101296 Richard noticed that modref is giving up on analysis in milc by
hitting --param=modref-max-accesses limit. While cleaning up original modref
patch I removed code that tried to do smart things while merging accesses
because it had bugs and wanted to reimplement it later which I later forgot.
This patch adds logic that avoids adding access and its subaccess to the list
which is just waste of memory and compile time. Incrementally I will add logic
merging the ranges.
gcc/ChangeLog:
2021-08-23 Jan Hubicka <hubicka@ucw.cz>
* ipa-modref-tree.h (modref_access_node::range_info_useful_p):
Improve range compare.
(modref_access_node::contains): New member function.
(modref_access_node::search): Remove.
(modref_access_node::insert): Be smarter about subaccesses.