diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-11-09 13:12:55 +0100 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-11-09 15:42:10 +0100 |
commit | 4e85ad79a137535393d8dc169359e1730cab3533 (patch) | |
tree | 807f1f89053079a2680caf8d8695fe292bac0282 /gcc/function-tests.c | |
parent | fa59c8dcd2f97c929150bd32bae1f341e0d7b0f7 (diff) | |
download | gcc-4e85ad79a137535393d8dc169359e1730cab3533.zip gcc-4e85ad79a137535393d8dc169359e1730cab3533.tar.gz gcc-4e85ad79a137535393d8dc169359e1730cab3533.tar.bz2 |
Cleanup irange::set.
[This is actually part of a larger patch that actually changes
behavior, but I thought I'd commit the non-invasive cleanups first
which will simplify the upcoming work.]
irange::set was doing more work than it should for legacy ranges.
I cleaned up various unnecessary calls to swap_out_of_order_endpoints,
as well as some duplicate code that could be done with normalize_min_max.
I also removed an obsolete comment wrt sticky infinite overflows.
Not only did the -INF/+INF(OVF) code get removed in 2017,
but normalize_min_max() uses wide ints, which ignored overflows
altogether.
gcc/ChangeLog:
* value-range.cc (irange::swap_out_of_order_endpoints): Rewrite
into static function.
(irange::set): Cleanup redundant manipulations.
* value-range.h (irange::normalize_min_max): Modify object
in-place instead of modifying arguments.
Diffstat (limited to 'gcc/function-tests.c')
0 files changed, 0 insertions, 0 deletions