]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ipa-prop.cc
Convert ipcp_vr_lattice to type agnostic framework.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 17 May 2023 09:29:34 +0000 (11:29 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Sat, 10 Jun 2023 21:56:46 +0000 (23:56 +0200)
commitbc5a2c2e793f186217327a5d9e9f20ef366ee0ef
treecd266b43b8c6ecd33a020db3f9ea8b555564c1ae
parent273a33b285b426be4e4b7213ecc090d088f9cd69
Convert ipcp_vr_lattice to type agnostic framework.

This converts the lattice to store ranges in Value_Range instead of
value_range (*) to make it type agnostic, and adjust all users
accordingly.

I've been careful to make sure Value_Range never ends up on GC, since
it contains an int_range_max and can expand on-demand onto the heap.
Longer term storage for ranges should be done with vrange_storage, as
per the previous patch ("Provide an API for ipa_vr").

gcc/ChangeLog:

* ipa-cp.cc (ipcp_vr_lattice::init): Take type argument.
(ipcp_vr_lattice::print): Call dump method.
(ipcp_vr_lattice::meet_with): Adjust for m_vr being a
Value_Range.
(ipcp_vr_lattice::meet_with_1): Make argument a reference.
(ipcp_vr_lattice::set_to_bottom): Set varying for an unsupported
range.
(initialize_node_lattices): Pass type when appropriate.
(ipa_vr_operation_and_type_effects): Make type agnostic.
(ipa_value_range_from_jfunc): Same.
(propagate_vr_across_jump_function): Same.
* ipa-fnsummary.cc (evaluate_conditions_for_known_args): Same.
(evaluate_properties_for_edge): Same.
* ipa-prop.cc (ipa_vr::get_vrange): Same.
(ipcp_update_vr): Same.
* ipa-prop.h (ipa_value_range_from_jfunc): Same.
(ipa_range_set_and_normalize): Same.
gcc/ipa-cp.cc
gcc/ipa-fnsummary.cc
gcc/ipa-prop.cc
gcc/ipa-prop.h