aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2022-07-31 13:43:36 +0200
committerAldy Hernandez <aldyh@redhat.com>2022-08-01 08:16:03 +0200
commit3f05605364f6f17b84842a8a5960d465b4448bae (patch)
treef74fe9fd71c1f3bf256bd602b38066909f26ba26 /gcc/c
parent7e029e067d81f714419cd196fdd506b06881e0c9 (diff)
downloadgcc-3f05605364f6f17b84842a8a5960d465b4448bae.zip
gcc-3f05605364f6f17b84842a8a5960d465b4448bae.tar.gz
gcc-3f05605364f6f17b84842a8a5960d465b4448bae.tar.bz2
Cleanups to frange.
These are some assorted cleanups to the frange class to make it easier to drop in an implementation with FP endpoints: * frange::set() had some asserts limiting the type of arguments passed. There's no reason why we can't handle all the variants. Worse comes to worse, we can always return a VARYING which is conservative and correct. * frange::normalize_kind() now returns a boolean that can be used in union and intersection to indicate that the range changed. * Implement vrp_val_max and vrp_val_min for floats. Also, move them earlier in the header file so frange can use them. Tested on x86-64 Linux. gcc/ChangeLog: * value-range.cc (tree_compare): New. (frange::set): Make more general. (frange::normalize_kind): Cleanup and return bool. (frange::union_): Use normalize_kind return value. (frange::intersect): Same. (frange::verify_range): Remove unnecessary else. * value-range.h (vrp_val_max): Move before frange class. (vrp_val_min): Same. (frange::frange): Remove set to m_type.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions