ipa-cp: Use the VR and bits lattices for clones of non-local functions too
Since the IPA-CP lattices for value ranges cannot hold more values and
don't have any "variable" flag, we initialize them to bottom for
non-local nodes. However, that means we don't make use of known
information gathered in jump functions when the corresponding node is
cloned for some other reason. This patch allows collection of the
information and only does not use them for the original non-local
nodes, while making sure that we do not propagate information through
such-non local nodes as there may be unknown calls.
gcc/ChangeLog:
2026-01-06 Martin Jambor <mjambor@suse.cz>
* ipa-cp.h (class ipcp_bits_lattice): New members set_recipient_only,
recipient_only_p and m_recipient_only.
(class ipcp_vr_lattice): Likewise.
(ipcp_vr_lattice::init): Initialize also m_recipient_only.
* ipa-cp.cc (ipcp_bits_lattice::print): Adjust printting to also
print the new flag.
(ipcp_vr_lattice::print): Likewise.
(ipcp_vr_lattice::set_recipient_only): New function.
(ipcp_bits_lattice::set_recipient_only): Likewise.
(set_all_contains_variable): New parameter MAKE_SIMPLE_RECIPIENTS, set
bits and vr lattices to recibient only insted to bottom when it is
true.
(initialize_node_lattices): Pass true to the second parameter of
set_all_contains_variable.
(propagate_bits_across_jump_function): Treat recipient_only source
lattices like bottom.
(propagate_vr_across_jump_function): Likewise.
(ipcp_store_vr_results): Skip non-local nodes.