]> git.ipfire.org Git - thirdparty/gcc.git/commit
Implement streamer for frange.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 25 Jul 2022 14:44:39 +0000 (16:44 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 2 Aug 2022 12:50:25 +0000 (14:50 +0200)
commit5f7e187e7fa4175204dac0d2f9d468d61762c11b
treed49004bb51a727a6243d455364e35d24acebff8a
parente9f5b4fa4f2c93ef76e3766b3edabfaebc100741
Implement streamer for frange.

This patch Allows us to export floating point ranges into the SSA name
(SSA_NAME_RANGE_INFO).

[Richi, in PR24021 you suggested that match.pd could use global float
ranges, because it would generally not invoke ranger.  This patch
implements the boiler plate to save the frange globally.]

[Jeff, we've also been talking in parallel of using NAN knowledge
during expansion to RTL.  This patch will provide the NAN bits in the
SSA name.]

Since frange's currently implementation is just a shell, with no
actual endpoints, frange_storage_slot only contains frange_props which
fits inside a byte.  When we have endpoints, y'all can decide if it's
worth saving them, or if the NAN/etc bits are good enough.

gcc/ChangeLog:

* tree-core.h (struct tree_ssa_name): Add frange_info and
reshuffle the rest.
* value-range-storage.cc (vrange_storage::alloc_slot): Add case
for frange.
(vrange_storage::set_vrange): Same.
(vrange_storage::get_vrange): Same.
(vrange_storage::fits_p): Same.
(frange_storage_slot::alloc_slot): New.
(frange_storage_slot::set_frange): New.
(frange_storage_slot::get_frange): New.
(frange_storage_slot::fits_p): New.
* value-range-storage.h (class frange_storage_slot): New.
gcc/tree-core.h
gcc/value-range-storage.cc
gcc/value-range-storage.h